How data is represented (bits, bytes, ASCII/Unicode)
Computer Science · Foundations
Question 1 of 10
0What is the binary number 10000 equal to in decimal?
Stuck? Read the explanation
Unlocks at a streak of 5 correct answers in a row.
Embed this practice on your site or class page
Paste this HTML into your page. Students practise right there; it is free and needs no account.
How data is represented (bits, bytes, ASCII/Unicode) explained
Computers store all data, including text, pictures and sound, as patterns of bits. A bit is a single 0 or 1, and eight bits make one byte. Character codes such as ASCII and Unicode give every character a number, and that number is stored in binary.
ASCII was designed for English. It uses 7 bits, giving 128 characters, which cover upper and lower case letters, digits, punctuation and some control codes. The capital letter A is code 65 and the lowercase a is code 97. Those 128 characters are not enough for other alphabets or for emoji, so Unicode was created to cover characters from almost every language. Unicode numbers are written in the form U+0041 for the letter A, and the UTF-8 encoding stores common English letters in one byte each.
A common mistake is to think the number 65 is stored as the digits 6 and 5. The letter A is actually stored as the 8-bit pattern 01000001, which is the binary form of 65.
Worked example
Store the word Hi in ASCII, using 8 bits per character.
- H is code 72: .
- i is code 105: .
- Each character takes one byte, so Hi needs 2 bytes, which is 16 bits.
What you will practise
105 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.
Example questions
- A bit is:
- A byte is:
- ASCII encodes:
- Unicode is designed to:
- The number 5 in binary is:
- How many bits make up a nibble?
- How many different values can 8 bits represent?
- The original ASCII standard uses how many bits for each character code?
…and 97 more.