KS48525 3.3.1 to 3.3.2 28 min read 10 question quiz 12 exam marks

Number Bases and Units of Information

Why computers use binary at all, how to convert between denary, binary and hexadecimal in both directions, and the units of information using AQA's decimal convention.

Why binary

Computers use binary, base 2, because the components they are built from have two reliable states. A transistor is either conducting or it is not. A voltage is either above the threshold or below it. A region of a disc is magnetised one way or the other.

Two states can be told apart even when the signal is noisy. Ten states would need nine thresholds, and a small amount of interference would push a value across one of them. Every extra state makes the electronics more expensive and less reliable, and binary is the point at which reliability is maximised.

The exam sentence

Computers use binary because their components have two easily distinguishable states, which makes storing and transmitting data reliable even when the signal degrades.

Base 2, base 10 and base 16

A number base is how many different digits a system uses.

  • Denary, base 10, uses the digits 0 to 9. Place values are 1, 10, 100, 1000.
  • Binary, base 2, uses 0 and 1. Place values are 1, 2, 4, 8, 16, 32, 64, 128.
  • Hexadecimal, base 16, uses 0 to 9 then A to F for ten to fifteen. Place values are 1, 16, 256.

Converting between the bases

Binary to denary

Write the place values above the bits and add up every column holding a 1.

128  64  32  16   8   4   2   1
  1   0   1   1   0   1   0   0
128     + 32 + 16     +  4        = 180

Denary to binary

Work from the left. Take the largest place value that fits, write a 1, subtract it, and carry on.

180 minus 128 leaves 52, so the 128 column is 1. 64 does not fit into 52, so 0. 52 minus 32 leaves 20, so 1. 20 minus 16 leaves 4, so 1. 8 does not fit, so 0. 4 minus 4 leaves 0, so 1. Then 0 and 0. The answer is 10110100.

Binary to hexadecimal

Split into groups of four bits from the right and convert each group on its own.

10110100 becomes 1011 and 0100. 1011 is 11, which is B. 0100 is 4. So the answer is B4.

Hexadecimal to binary

Reverse it. Each hex digit becomes exactly four bits. 2F becomes 0010 and 1111, so 00101111.

Hexadecimal to denary and back

B4 is 11 times 16, plus 4, which is 180. Going the other way, 180 divided by 16 is 11 remainder 4, so the digits are B and 4.

Always go through binary

Denary to hex is denary to binary to hex. Hex to denary is hex to binary to denary. That way you only ever need two conversions rather than six.

Why hexadecimal is used

Sixteen is two to the power of four, so one hexadecimal digit stands for exactly four bits and one byte is always two hex digits. A value written in hex takes a quarter of the characters, which makes memory addresses, colour codes and MAC addresses far easier for people to read, write and compare without mistakes.

Converting binary 01011010 to denary using place valuesAn eight bit binary number laid out under its place values. The place values from left to right are 128, 64, 32, 16, 8, 4, 2 and 1, each half the one to its left. The bits are 0, 1, 0, 1, 1, 0, 1, 0. Where a bit is 1 the column contributes its place value, so the contributions are 0, 64, 0, 16, 8, 0, 2 and 0. Adding the contributions gives 64 plus 16 plus 8 plus 2, which is 90. So binary 01011010 is 90 in denary.1280064164320016116818400212100placebitworth64 + 16 + 8 + 2 = 90so 01011010 in binary is 90 in denary
Write the place values above the bits every single time. It costs five seconds and removes almost every conversion error.

Number base converter

Convert between denary, binary and hexadecimal, with every step of the working written out. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.

The eight place value columns of a byte, here holding 0101 1010The eight place value columns of a byte, drawn as blocks whose height is the value of the column: 128, 64, 32, 16, 8, 4, 2 and 1 from left to right, each one worth double the column to its right. Above each column is a light that is on for a 1 and off for a 0. To read a binary number, take the value of every column holding a 1 and ignore every column holding a 0. For 0101 1010 that means taking 64, 16, 8 and 2, which add up to 90. The tallest block shows something worth remembering: the leftmost column, 128, is worth more than all of the other seven added together, which come to 127.0128skip164032skip1161804skip1201skipa 1 means take the column, a 0 means skip it128 is worth more than all the rest together (127)64 + 16 + 8 + 2 = 901234
  1. Eight columns, and each one is worth double the one to its right.
  2. A 1 means take that column's value. A 0 means skip it.
  3. Add up the columns you took: 64 + 16 + 8 + 2 = 90.
  4. The leftmost bit is worth more than every other bit added together.
Each column doubles. Learn the row 128 64 32 16 8 4 2 1 and every conversion question becomes adding up.
Converting 1010 1111 to hexadecimal one nibble at a time, and the sixteen hex digitsHow to convert a byte to hexadecimal. The byte 1010 1111 is split into two nibbles of four bits each: 1010 on the left and 1111 on the right. Each nibble is converted on its own using the place values 8, 4, 2 and 1. The left nibble is 8 plus 2, which is 10, and 10 is the hex digit A. The right nibble is 8 plus 4 plus 2 plus 1, which is 15, and 15 is the hex digit F. Written side by side the byte is AF in hex. Underneath is a table of all sixteen hex digits with their denary and four bit binary values: 0 to 9 are written as themselves and 10 to 15 are written A, B, C, D, E and F.Binary to hex, one nibble at a time101011118 + 2 = 10A8 + 4 + 2 + 1 = 15FAFside by sideThe sixteen hex digitshexdenarybinary000000110001220010330011440100550101660110770111881000991001A101010B111011C121100D131101E141110F151111One hex digit is always exactly four bits.1234
  1. Split the byte into two nibbles of four bits. Colours keep each nibble with its digit.
  2. Convert each nibble on its own with 8, 4, 2 and 1: 1010 is 10 and 1111 is 15.
  3. Write each value as one hex digit, 10 as A and 15 as F, and put them side by side.
  4. Learn the table: 0 to 9 look the same in hex, then A is 10 up to F which is 15.
Split into nibbles, convert each, join them up. Going the other way, turn each hex digit back into four bits.

Units of information

A bit is a single binary digit, a 0 or a 1. A nibble is 4 bits. A byte is 8 bits.

UnitSize
kilobyte (kB)1000 bytes
megabyte (MB)1000 kilobytes
gigabyte (GB)1000 megabytes
terabyte (TB)1000 gigabytes
AQA uses 1000, not 1024

This is a genuine board difference and it changes your answers. Divide by 1000 at every step, and if you use 1024 you will not match the mark scheme.

Calculating a file size

Every file size question follows the same three steps.

  1. Work out the total number of bits using the right formula.
  2. Divide by 8 to get bytes.
  3. Divide by 1000 for each unit you go up.

The formulas themselves come in the images, sound and compression topics, but the conversion at the end is always the same, and it is where most marks are lost.

File size calculator

Work out the size of an image, a sound file or a block of text, one conversion at a time. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.

The units of data storage, each step a thousand times the lastThe units of data storage drawn as a staircase, each step sitting on the one below it. A bit is a single binary digit, one 0 or one 1, and it is the smallest thing a computer can store. A nibble is four bits. Eight bits make a byte, which is enough to hold one character of text. A thousand bytes make a kilobyte, roughly a page of plain text. A thousand kilobytes make a megabyte, about the size of a photograph or a minute of music. A thousand megabytes make a gigabyte, about a film, and a thousand gigabytes make a terabyte, about the capacity of a hard disk. Each step up from the byte is a thousand times the last.bit1byte8 bitsAKB1,000 bytesa page of textMB1,000 KBa photographGB1,000 MBa filmTB1,000 GBa hard diskeach step up is × 100012345
  1. A bit is one binary digit: a single 0 or a single 1.
  2. Eight bits make a byte, which is enough for one character.
  3. A thousand bytes make a kilobyte. A page of plain text.
  4. A thousand kilobytes make a megabyte. A photograph, or a minute of music.
  5. A thousand megabytes make a gigabyte, and a thousand of those a terabyte.
Each step up is a thousand times the last. That is why a film does not fit on a floppy disk and a text file always will.
File size formulas for an image, a sound and a piece of text, each worked through to a size in bytesThe file size of three kinds of data, each worked through from the formula to a size. For an image, multiply the width by the height by the colour depth: 1,000 times 800 times 24 is 19,200,000 bits, which divided by 8 is 2,400,000 bytes, or 2.4 megabytes. For a sound, multiply the sample rate by the bit depth by the number of seconds: 44,100 times 16 times 10 is 7,056,000 bits, which divided by 8 is 882,000 bytes, or 0.88 megabytes. For text, multiply the number of characters by the bits per character: 2,000 times 8 is 16,000 bits, which divided by 8 is 2,000 bytes, or 2 kilobytes. To move up the units, divide bits by 8 for bytes, then by 1,000 for kilobytes, megabytes and gigabytes. OCR, AQA and Key Stage 3 use 1,000. Edexcel uses 1,024 and the names kibibyte, mebibyte and gibibyte.Image1width1,000× height800× colour depth24= 19,200,000 bits÷ 8 = 2,400,000 bytes2.4 MBSound2sample rate44,100× bit depth16× seconds10= 7,056,000 bits÷ 8 = 882,000 bytes0.88 MBText3characters2,000× bits each8= 16,000 bits÷ 8 = 2,000 bytes2 KBFrom bits to bigger units4bits÷ 8bytes÷ 1000KB÷ 1000MB÷ 1000GBOCR, AQA and Key Stage 3 divide by 1000. Edexcel divides by 1024 and writes KiB, MiB and GiB.
  1. Image: width × height × colour depth. Every pixel costs the colour depth in bits.
  2. Sound: sample rate × bit depth × seconds, and × 2 for stereo.
  3. Text: number of characters × bits per character. ASCII uses 8.
  4. Divide by 8 to turn bits into bytes, then by 1,000 for each step up.
Every file size question is the same three steps: multiply, divide by 8, then change the unit. Show each step.

Key terms you must be able to define

Bit
A single binary digit, either 0 or 1.
Nibble
Four bits, which is one hexadecimal digit.
Byte
Eight bits.
Binary
Base 2, using only the digits 0 and 1.
Denary
Base 10, the everyday number system using the digits 0 to 9.
Hexadecimal
Base 16, using 0 to 9 and then A to F.
Place value
The value a digit represents because of its position in a number.
Kilobyte
One thousand bytes in the convention AQA uses.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefineBit
AnswerA single binary digit, either 0 or 1.
DefineNibble
AnswerFour bits, which is one hexadecimal digit.
DefineByte
AnswerEight bits.
DefineBinary
AnswerBase 2, using only the digits 0 and 1.
DefineDenary
AnswerBase 10, the everyday number system using the digits 0 to 9.
DefineHexadecimal
AnswerBase 16, using 0 to 9 and then A to F.
DefinePlace value
AnswerThe value a digit represents because of its position in a number.
DefineKilobyte
AnswerOne thousand bytes in the convention AQA uses.

Reach the top grade on this topic

The marks here are almost entirely method marks, and the students who lose them are the ones working in their heads.

Write the place values down every time. 128, 64, 32, 16, 8, 4, 2, 1 above the columns. It takes five seconds and it removes almost every conversion error.

Show the subtraction. In denary to binary, writing 180 minus 128 equals 52 earns method credit even if a later column goes wrong.

Check the other way. A conversion takes ten seconds to verify by converting back, and a wrong answer you caught costs nothing.

Say which convention you used. If a file size question is ambiguous, write "using 1 kB as 1000 bytes" beside your working. AQA's mark schemes expect 1000, and stating it protects you either way.

Mistakes that cost marks here

Avoid these
  • Using 1024 rather than 1000 when converting units for AQA.
  • Forgetting to divide by 8 when converting bits to bytes.
  • Reading binary from the wrong end. The leftmost bit has the largest place value.
  • Writing hex digits above F. Hexadecimal stops at F, which is fifteen.
  • Splitting binary into groups of four from the left rather than from the right, which puts every digit in the wrong column.
Fun fact

AQA is one of the boards that uses 1000 bytes to a kilobyte rather than 1024. That is not a simplification: it matches the international standard, in which 1024 bytes is properly a kibibyte.

Knowledge check

0 of 10 answered
1Convert 10011010 into denary.
2Convert 200 into 8 bit binary.
3Convert 11101011 into hexadecimal.
4Convert hexadecimal 3C into denary.
5How many bits are there in a nibble?
6Using AQA's convention, how many bytes are in 3 kilobytes?
7Why do computers use binary rather than denary?
8Why is hexadecimal used to write memory addresses?
9A file is 4500000 bits. What is its size in megabytes, using AQA's convention?
10What is the largest denary value that can be stored in one byte?
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

12 marks
1Explain why computers use the binary number system.2 marks
Explain

Mark scheme0 / 2
  • LThe components a computer is built from have two distinguishable states
  • LThis makes storing and transmitting data reliable even when the signal degrades
Model answer

Computers are built from components such as transistors that have two clearly distinguishable states, either conducting or not conducting. Representing data with just two symbols means a value can still be read correctly even when the signal has been weakened or has picked up interference, which makes storage and transmission far more reliable than a system with many states would be.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Convert the denary number 214 into 8 bit binary. Show your working.2 marks
Convert

Mark scheme0 / 2
  • LShows a valid method, such as subtracting place values
  • LGives the answer 11010110
Model answer

Starting from the largest place value, 128 fits into 214 leaving 86, so the 128 column is 1. 64 fits into 86 leaving 22, so 1. 32 does not fit, so 0. 16 fits into 22 leaving 6, so 1. 8 does not fit, so 0. 4 fits leaving 2, so 1. 2 fits leaving 0, so 1. Then 0. The answer is 11010110.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3Convert the binary number 01111010 into hexadecimal. Show your working.2 marks
Convert

Mark scheme0 / 2
  • LSplits into two groups of four bits, 0111 and 1010
  • LGives the answer 7A
Model answer

Splitting the eight bits into groups of four from the right gives 0111 and 1010. The group 0111 is 4 plus 2 plus 1, which is 7. The group 1010 is 8 plus 2, which is 10, and 10 is written as A in hexadecimal. So the answer is 7A.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4Explain why programmers often write binary values in hexadecimal.3 marks
Explain

Mark scheme0 / 3
  • LOne hexadecimal digit represents exactly four bits
  • LSo a value can be written in a quarter of the characters
  • LShorter values are easier for people to read and less likely to be mistyped
Model answer

Sixteen is two to the power of four, so each hexadecimal digit corresponds to exactly four bits and a byte is always written as two hexadecimal digits. A long run of ones and zeros is extremely easy to lose your place in, and a single misread digit gives a completely different value. Written in hexadecimal the same value takes a quarter of the characters, so it is quicker to read aloud, quicker to write down and far easier to compare with another value, which is why memory addresses, colour codes and MAC addresses are all written this way.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5A file is 6 megabytes in size. Calculate how many bits this is, using 1 kilobyte as 1000 bytes.3 marks
Calculate

Mark scheme0 / 3
  • LConverts megabytes to kilobytes by multiplying by 1000
  • LConverts kilobytes to bytes by multiplying by 1000
  • LMultiplies bytes by 8 to get 48000000 bits
Model answer

Six megabytes is 6 times 1000, which is 6000 kilobytes. That is 6000 times 1000, which is 6000000 bytes. Each byte is 8 bits, so the file is 6000000 times 8, which is 48000000 bits.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 12