Skip to main content
SingaporeComputer ScienceSyllabus dot point

Why do computers use binary, and how do place value and hexadecimal help us read those binary patterns?

Explain why computers use binary, describe place value in binary and hexadecimal, and state why hexadecimal is used as shorthand for binary

A focused answer to the O-Level Computing point on number systems. Why computers use binary, place value in binary and hexadecimal, the meaning of bits and bytes, and why hexadecimal is a compact shorthand for binary.

Generated by Claude Opus 4.87 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

SEAB wants you to explain why computers use the binary number system, to describe place value in binary (base 2) and hexadecimal (base 16), and to say why hexadecimal is used as a shorthand for binary. The central idea is that a computer is built from switches with only two states, so two digits are enough, and that hexadecimal simply groups those binary digits into a more readable form.

The answer

Why computers use binary

A computer is made of millions of tiny electronic switches called transistors. Each switch is either on or off, with no reliable in-between state. The binary number system has exactly two digits, 00 and 11, so we can let 00 mean off and 11 mean on. Every piece of data, whether a number, a letter, a sound or an image, is ultimately stored as a pattern of these two values.

Using only two states makes the hardware simple and reliable: it is easy to tell apart a high voltage from a low voltage, even with a little electrical noise.

Bits and bytes

A single binary digit is called a bit. A group of 88 bits is called a byte. One byte can store 256256 different patterns, from 0000000000000000 to 1111111111111111, which is enough to represent one text character or a number from 00 to 255255.

Place value in binary

Binary uses positional place value, exactly like denary, but each column is a power of two instead of a power of ten:

, 23=8, 22=4, 21=2, 20=1\dots,\ 2^3 = 8,\ 2^2 = 4,\ 2^1 = 2,\ 2^0 = 1

So the 4-bit number 110121101_2 has bits in the 88, 44 and 11 columns:

11012=8+4+0+1=131101_2 = 8 + 4 + 0 + 1 = 13

Place value in hexadecimal

Hexadecimal uses base 16, so each column is a power of sixteen, and it needs sixteen digits. The digits run 00 to 99 and then A,B,C,D,E,F\text{A}, \text{B}, \text{C}, \text{D}, \text{E}, \text{F} for the values ten to fifteen:

Hex A B C D E F
Denary 10 11 12 13 14 15

Why hexadecimal is shorthand for binary

Because 16=2416 = 2^4, one hexadecimal digit represents exactly four binary bits, called a nibble. This makes hex a compact way to write binary: an 8-bit byte that needs eight binary digits needs only two hex digits.

binary:  1010 1111
hex:        A    F   -> AF

Examples in context

Example 1. Web colours. A colour on a web page such as #FF8800 is three pairs of hex digits for the red, green and blue intensities. Each pair is one byte, so FF is 255255 (full intensity) and 00 is 00 (none). Designers read these directly because hex packs each byte into two digits.

Example 2. File sizes. When a phone reports a photo as taking up several megabytes, it is counting bytes, and each byte is eight bits. Understanding that a byte holds 256256 patterns is the first step to understanding why a higher-quality image, with more bits per pixel, takes more storage.

Try this

Q1. State what a bit and a byte are, and how they are related. [2 marks]

  • Cue. A bit is a single binary digit (00 or 11); a byte is a group of eight bits.

Q2. Give the denary value of 11100211100_2. [2 marks]

  • Cue. Place values 16,8,4,2,116, 8, 4, 2, 1, so 16+8+4=2816 + 8 + 4 = 28.

Q3. Explain why one hexadecimal digit can represent any 4-bit binary value. [2 marks]

  • Cue. Four bits give 24=162^4 = 16 patterns, and hexadecimal has exactly 1616 digits (00 to F\text{F}), so each pattern maps to one hex digit.

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original4 marks(a) State why computers store and process all data in binary. (b) The binary number 101121011_2 uses place values. State the place value of each of its four bits, then give the denary value of 101121011_2.
Show worked answer →

(a) A computer is built from electronic switches (transistors) that have only two stable states, on and off. Binary has exactly two digits, 00 and 11, so each digit maps directly to one switch state. This makes storage and processing reliable and simple to build.

(b) The place values of a 4-bit number from left to right are 8,4,2,18, 4, 2, 1 (powers of two: 23,22,21,202^3, 2^2, 2^1, 2^0). For 101121011_2:

8  4  2  1
1  0  1  1

So 10112=8+0+2+1=111011_2 = 8 + 0 + 2 + 1 = 11 in denary.

Markers reward linking two binary digits to two switch states, the correct place values 8,4,2,18, 4, 2, 1, and the denary total 1111.

Original3 marksA programmer writes a colour as the hexadecimal value 2F16\text{2F}_{16}. (a) State how many binary bits one hexadecimal digit represents. (b) Explain one reason programmers prefer hexadecimal to long binary strings.
Show worked answer →

(a) One hexadecimal digit represents exactly 44 binary bits (a nibble), because 16=2416 = 2^4.

(b) A long binary string is hard to read and easy to copy wrongly. Hexadecimal packs every four bits into a single digit, so an 8-bit byte becomes just two hex digits. This makes values such as colours, memory addresses and machine codes far shorter and less error-prone to write.

Markers reward one hex digit equals four bits, and a clear reason such as compactness or fewer transcription errors.

Related dot points