Just getting started with rust, and as I was reading the documentation it came to Booleans are represented with a single Byte. I wanted to know what are the byte values that are being used for True and False. Some Language that I have worked with in the past used for False and X for True, I guess others could use 0 for true, another way would be to T and F.
Example if T was used => |01010100|
I don't know where and why I would ever need it but just out of curiosity I would like to know.
Bonus points if you can help me find it via code. I am an absolute beginner when it comes to rust, so I tried to convert the boolean to a string or character but was not able to do so, tried looking up what methods can be applied to a boolean and there isn't much. I was able to use to_string(), but it came back true or false.
Numeric types in Rust aren't stored as strings, there's no need for that and it would be unnecessarily complicated and inefficient. They are stored as their "raw" memory representation. An u8 is a single byte, a u16 is stored on 2 bytes, etc.