Data Representation: Binary, Hex and Data Types
How computers store everything as 1s and 0s: binary and why it is used, converting between binary, denary and hexadecimal, units of storage, and the main data types.
Get the method right under pressure
Free interactive practice on the steps that lose marks under exam pressure.
Start revising freeWhat you'll cover
Everything as ones and zeros
Computers store and process everything, from numbers and text to images and sound, as binary: a code made of only two digits, 0 and 1. Each binary digit is a bit, and a group of eight bits is a byte. Because long binary numbers are hard for people to read, they are often written in hexadecimal, a base-16 shorthand that uses the digits 0 to 9 and then the letters A to F. Being able to convert between binary, denary, which is the ordinary base-10 number system, and hexadecimal is a core skill. Data also comes in types, such as whole numbers, decimals, single characters and true-or-false values. This module covers the number bases and how to convert between them, the units of storage, and the main data types.
Data words
Learn what each of these means before you use it.
Binary against hexadecimal
Both describe the same data; one is how the computer stores it, the other is how people write it.
How to convert binary to denary
To turn a binary number into an ordinary denary number, use place values. Reading from the right, each bit is worth twice the one before: 1, 2, 4, 8, 16 and so on. Write the place value above each bit, then add up the values wherever there is a 1. For example the binary number 1010 has a 1 in the eights column and a 1 in the twos column, so it is 8 add 2, which gives 10. Any column holding a 0 is ignored. The same idea in reverse turns a denary number back into binary, by fitting it into those place values.
Binary to denary
Convert the binary number 1101 into denary. Add the place values 8, 4, 2 and 1 wherever there is a 1.
Why binary?
Why do computers represent all data in binary, using only 0 and 1?
- because their circuits have two states, such as on and off, that match 0 and 1
- because binary numbers are shorter than denary numbers
- because people find binary easy to read
- because binary can store only text
Match the data term to its meaning
- a bit
- a byte
- ASCII
- a bitmap
- a single binary digit, 0 or 1
- a group of eight bits
- a code that represents characters as numbers
- an image stored as a grid of pixels
Hex to denary
In hexadecimal the letters A to F stand for the denary numbers 10 to 15. Work out the value of the hex digit F in denary.
True about data
Select the TWO statements that are true.
- A byte is made of eight bits
- Hexadecimal uses the digits 0 to 9 and the letters A to F
- Binary uses the digits 0 to 9
- One bit can store a whole word of text
Complete the data facts
A single binary digit, 0 or 1, is called a _____. A group of eight bits is a _____. The base-16 system that uses the letters A to F is called _____. A data type that can hold only true or false is called a _____.
Order the units of storage
Put these units of computer storage in order, from the smallest to the largest.
- a bit
- a nibble
- a byte
- a kilobyte
Spot the true data facts
Tap the TWO statements that are true.
- Binary uses only the digits 0 and 1
- A byte is made up of eight bits
- Hexadecimal is a base-10 system
- One bit can store an entire image
Work with the data
Read each case and choose the best response, with a reason.
- You need to convert the binary number 1000 into denary. What is it?
- A programmer wants to store a value that can only be true or false. Which data type fits?
- Why is hexadecimal often used instead of long binary numbers?
Explain data representation
A friend is starting GCSE Computer Science and asks why everything is stored as ones and zeros. Explain how computers represent data.
- Explain what binary is and why computers use it
- Explain what a bit and a byte are
- Explain what hexadecimal is and why it is useful
- Explain how to convert a small binary number into denary
- Finish by naming two data types and what each one holds