Coding other information to binary Flashcards
How is text stored?
This is done by encoding each of the letters of the alphabet along with other punctuation marks that you need. Each character is given a code and there are a couple of encoding schemes; ASCII and Unicode.
The two main character sets?
ASCII and Unicode
ASCII?
ASCII is the simplest scheme and uses 7 bits to encode letters of the western alphabet and various other symbols.
Unicode?
Unicode is more complex, being able to encode different alphabets and technical symbols and lots more beyond the ASCII characters. It uses up to 32 bits, and currently encodes around 110,000 different characters.
How do upper and lower case letters work in ASCII?
Example: the upper-case letter ‘A’ has an ASCII value of 100 00012 (6116), whereas the lower-case letter ‘a’ has a value of 110 00012 (4116). Therefore there is a difference of 2016 between the lower- and upper-case set of letters (i.e. a flip of the 6th bit).
How are Boolean represented?
Sometimes you will need to encode whether something is true or false. In binary this is typically done simply by representing true as 1 and false as 0.