Revision notes

Number Systems in Computing: Foundation

The key points, rules to remember, tables and diagrams from all 9 lessons, on one page for quick revision. To keep a copy, use your browser's Print and choose "Save as PDF".

Lesson 1

Why computers use binary: place value and bases

The four systems
SystemBaseDigits used
Decimal100 to 9
Binary20, 1
Octal80 to 7
Hexadecimal160 to 9 and A to F (A=10, B=11, C=12, D=13, E=14, F=15)
Powers of 2
Power2^02^12^22^32^42^52^62^72^8
Value1248163264128256

A base-b system uses digits 0 to b-1; each place is b times the place to its right.

— Remember
  • Value of a digit depends on its place and the base.
  • Binary has 2 digits, octal 8, decimal 10, hexadecimal 16.
  • Learn powers of 2 up to 256.
Read the full lesson

Lesson 2

Converting between binary and decimal

Convert 25 to binary
DivisionQuotientRemainder
25 / 2121
12 / 260
6 / 230
3 / 211
1 / 201

Binary to decimal: add place values where there is a 1. Decimal to binary: divide by 2 and read remainders upward.

— Remember
  • Use place values 1, 2, 4, 8, 16, 32, 64, 128.
  • Remainders are read from bottom to top.
  • Always check by converting back.
Read the full lesson

Lesson 3

Octal and hexadecimal

Hex digits
Decimal101112131415
HexABCDEF

Octal = 3 bits per digit. Hex = 4 bits per digit. A=10 to F=15.

— Remember
  • Group bits in 3s for octal and 4s for hex.
  • Hex letters A to F stand for 10 to 15.
  • Check conversions by turning them back into decimal.
Read the full lesson

Lesson 4

Binary arithmetic and complements

Rules
SumResult
0 + 00
0 + 11
1 + 01
1 + 110 (write 0, carry 1)
1 + 1 + 111 (write 1, carry 1)

1 + 1 = 10 in binary. 2's complement = flip all bits, then add 1.

— Remember
  • Binary addition carries when a column reaches 2.
  • 1's complement flips bits; 2's complement adds 1.
  • Verify by converting to decimal.
Read the full lesson

Lesson 5

Codes: BCD, ASCII, Unicode and bit capacity

Codes
CodeMeaningNotes
BCDBinary Coded DecimalEach decimal digit is written as its own 4-bit group
ASCIIAmerican Standard Code for Information InterchangeStandard 7-bit code with 128 characters; an extended 8-bit version has 256
EBCDICExtended Binary Coded Decimal Interchange CodeAn 8-bit code used on some older mainframes
UnicodeUniversal character setCovers letters of most of the world's languages, including Indian scripts

n bits give 2^n patterns. ASCII A = 65, a = 97. BCD uses 4 bits per decimal digit.

— Remember
  • Characters are stored as numbers using a code.
  • n bits hold 2^n patterns.
  • ASCII is 7-bit; Unicode covers many scripts.
Read the full lesson

Lesson 6

Counting and reading numbers in base 2, 8 and 16

The first seventeen numbers in four bases
DecimalBinaryOctalHexadecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010

A digit must always be smaller than the base. Counting resets to 0 and carries one to the left.

Key takeaways. Counting in any base is carrying when a place is full. The largest digit is one less than the base. Always check the base before reading what a numeral means, and use the place values 1, 8, 64 for octal and 1, 16, 256 for hexadecimal when expanding.

Read the full lesson

Lesson 7

Two more conversion methods: doubling and subtracting powers

Two numbers written on the place-value chart
Place value1286432168421
Example 10001100100
Example 7701001101

Two different methods that give the same answer are better than one method done twice.

Key takeaways. Doubling turns a bit string into a number by working left to right. Subtracting powers turns a number into bits by choosing the biggest power first. Memorise the powers 1, 2, 4, 8, 16, 32, 64, 128, 256 so that both methods are quick.

Read the full lesson

Lesson 8

Doubling, halving and shifting bits

Shifting examples
OperationBinaryDecimalEffect
Start1015-
Left shift once101010Doubled
Left shift twice1010020Multiplied by 4
Right shift once from 1101110613 halved, remainder 1 dropped

A zero added on the right multiplies by the base. A bit dropped from the right divides by 2 and keeps the remainder.

Key takeaways. Shifts are multiplication and division by powers of the base. The last bit tells you odd or even. These facts allow quick checks: when you double a number, its binary form simply gains a 0 at the end.

Read the full lesson

Lesson 9

Bits, bytes and storage units

Units of digital information
UnitMeaningEquals
BitOne binary digit0 or 1
Nibble4 bitsHalf a byte
Byte8 bitsOne character in a simple one-byte code
Kilobyte (KB)1024 bytes2 to the power 10 bytes
Megabyte (MB)1024 KB2 to the power 20 bytes
Gigabyte (GB)1024 MB2 to the power 30 bytes
Terabyte (TB)1024 GB2 to the power 40 bytes

Same unit first, then divide. Up the ladder divide by 1024; down the ladder multiply by 1024.

Key takeaways. Bit, nibble (4 bits), byte (8 bits), then KB, MB, GB, TB each 1024 times the one before. Always convert to a common unit before dividing, and watch capital and small b.

Read the full lesson

Privacy · Terms · Refunds · Delivery