UNIHIVE

Study Hub UNIPORT GES 101

GES 101 · Computer Appreciation and Application

Number systems and data representation

Binary, octal, decimal and hexadecimal, and how to convert between them. Also binary addition and how text is stored as codes such as ASCII. Conversion questions are almost certain.

Our notes

1 min read

Computers store everything as binary (0s and 1s) because electronic circuits have two states: on and off.

Number bases

SystemBaseDigits
Binary20, 1
Octal80–7
Decimal100–9
Hexadecimal160–9, A(10), B(11), C(12), D(13), E(14), F(15)

Each place is a power of the base. In binary: … 16, 8, 4, 2, 1.

Binary to decimal

Multiply each digit by its place value and add.
1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀

Decimal to binary

Divide by 2 repeatedly and write the remainders from bottom to top.
25 ÷ 2 = 12 r 1 → 12 ÷ 2 = 6 r 0 → 6 ÷ 2 = 3 r 0 → 3 ÷ 2 = 1 r 1 → 1 ÷ 2 = 0 r 1
Reading upwards: 25₁₀ = 11001₂

The same method works for any base: divide by 8 for octal, by 16 for hexadecimal.

Binary to octal and hexadecimal (shortcuts)

  • Octal: group binary digits in threes from the right. 110 101₂ = 6 5 = 65₈
  • Hexadecimal: group in fours from the right. 1010 1111₂ = A F = AF₁₆

Binary addition

Rules: 0+0 = 0; 0+1 = 1; 1+1 = 10 (write 0, carry 1); 1+1+1 = 11 (write 1, carry 1).

  1011
+ 0110
= 10001 (11 + 6 = 17)

Binary subtraction

0−0 = 0; 1−0 = 1; 1−1 = 0; 0−1 = 1 borrow 1. Computers usually subtract using two's complement: invert the bits and add 1 to get the negative of a number.

Data representation

  • Characters are stored as codes: ASCII (7 or 8 bits, e.g. 'A' = 65) and Unicode (covers all world scripts, emoji, and Nigerian letters like ẹ, ọ, ṣ).
  • Images are stored as pixels, each pixel a number for its colour.
  • Sound is stored by sampling the wave many times a second.

Exams usually ask: convert between bases (both directions); add binary numbers; what ASCII and Unicode are.

Common mistake: reading the remainders from top to bottom when converting decimal to binary. Read from the last remainder up.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All GES 101 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.