GES 101 · Computer Appreciation and Application
Our notes
1 min readComputers store everything as binary (0s and 1s) because electronic circuits have two states: on and off.
Number bases
| System | Base | Digits |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Decimal | 10 | 0–9 |
| Hexadecimal | 16 | 0–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
-
Binary number
(opens en.wikipedia.org in a new tab)
Wikipedia, Binary number, CC BY-SA 4.0 · licence
-
Computers and the Internet
Free lessons and practice with instant feedback.
(opens khanacademy.org in a new tab)
Watch
-
Number Systems Introduction - Decimal, Binary, Octal & Hexadecimal
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Representing Numbers and Letters with Binary: Crash Course Computer Science #4
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
How To Convert Decimal to Binary
13 min · ≈ 59 MB · about ₦33
(opens youtube.com in a new tab)
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.