Hexadecimal (base‑16) is a compact, human‑readable way of representing binary data. One hexadecimal digit (a “hex digit”) corresponds exactly to four binary bits (a “nibble”). This relationship means that large binary numbers can be written with far fewer characters, making it easier to:
Binary → Decimal
Example: 101101₂
| Bit | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|---|
| Value | 1 | 0 | 1 | 1 | 0 | 1 |
Calculation: 1·32 + 0·16 + 1·8 + 1·4 + 0·2 + 1·1 = 45₁₀
Decimal → Binary
Example: 156₁₀
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 2 | 78 | 0 |
| 78 ÷ 2 | 39 | 0 |
| 39 ÷ 2 | 19 | 1 |
| 19 ÷ 2 | 9 | 1 |
| 9 ÷ 2 | 4 | 1 |
| 4 ÷ 2 | 2 | 0 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Reading the remainders bottom‑up gives 10011100₂.
Decimal → Hexadecimal
Example: 156₁₀ → ?₁₆
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 16 | 9 | 12 (C) |
| 9 ÷ 16 | 0 | 9 |
Result: 9C₁₆.
Hexadecimal → Decimal
Example: 0x7F → ?₁₀
Sum = 112 + 15 = 127₁₀.
Group binary digits into nibbles (4 bits) starting from the right‑most side, then replace each nibble with its hex equivalent.
Example: 101101110010₂ → ?₁₆
| Binary nibble | Hex digit |
|---|---|
| 1011 | B |
| 0111 | 7 |
| 0010 | 2 |
Result: B72₁₆.
These tables show the maximum values for 8‑bit and 16‑bit unsigned numbers and give the direct conversion triples.
| Bits | Maximum unsigned value (Dec) | Binary (full) | Hex |
|---|---|---|---|
| 8 bits | 255 | 1111 1111₂ | FF₁₆ |
| 16 bits | 65 535 | 1111 1111 1111 1111₂ | FFFF₁₆ |
| Binary (4 bits) | Hex | Decimal |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
Computers usually work with fixed‑size bytes (8 bits). The largest unsigned value that can be stored in one byte is 255₁₀ (11111111₂). Adding two numbers that exceed this limit produces an overflow – the carry out of the most‑significant bit is discarded.
Example: 150₁₀ + 130₁₀
10010110+10000010-----------1 00011000 (9‑bit result)The mathematically correct sum is 280₁₀, but an 8‑bit register can only hold 24₁₀; the discarded carry sets the overflow flag.
A logical shift moves all bits left or right, inserting 0s into the vacated positions. It is used for fast multiplication/division by powers of two.
Logical shifts treat the number as unsigned; the sign bit is not preserved.
Two’s‑complement allows a single binary pattern to represent both positive and negative integers.
Example: –45₁₀ in an 8‑bit system
Thus, –45₁₀ is stored as 11010011₂. To verify, add the positive and negative forms:
00101101 +11010011 ----------- 100000000 (extra carry discarded → 00000000)
Modern computers address memory in bytes. Since a byte consists of 8 bits (two nibbles), a memory address is naturally expressed in hexadecimal.
Example address: 0x3F2A → binary 0011 1111 0010 1010. Using hexadecimal reduces a 16‑bit address to just four readable characters.
#FF5733).Both ASCII and Unicode assign a hexadecimal code point to each character. The table below shows a small sample relevant to the IGCSE syllabus.
| Char | ASCII (Dec) | ASCII (Hex) | Unicode (U+) |
|---|---|---|---|
| A | 65 | 41 | U+0041 |
| a | 97 | 61 | U+0061 |
| 0 | 48 | 30 | U+0030 |
| Space | 32 | 20 | U+0020 |
| € | — | — | U+20AC |
| é | — | — | U+00E9 |
File size (in bytes) = (width × height × colour‑depth) ÷ 8.
Example: A 1920 × 1080 pixel image with 24‑bit colour (true colour).
A data packet is the basic unit of communication in most networks. The typical layout is:
| Field | Purpose |
|---|---|
| Header | Contains source/destination addresses, packet type, length, and error‑checking information (e.g., CRC). |
| Payload (Data) | The actual user data being transferred. |
| Trailer | Often a frame‑check sequence or other end‑of‑packet marker. |
| Mode | Direction | Typical use |
|---|---|---|
| Simplex | One‑way only | Keyboard to computer, TV broadcast. |
| Half‑duplex | Two‑way, but not simultaneously | Walkie‑talkies, RS‑485. |
| Full‑duplex | Two‑way simultaneously | Ethernet, USB, telephone. |
| Characteristic | Serial | Parallel |
|---|---|---|
| Bits sent per clock cycle | 1 | Multiple (usually 8‑16) |
| Cabling | Single pair (or few pairs) | Many wires, bulkier |
| Distance | Longer (up to kilometres) | Short (centimetres‑metres) |
| Common examples | USB, RS‑232, Ethernet | Older printer ports, internal CPU‑bus |
0x81 for an IN endpoint).A NIC provides the hardware link to a network. Each NIC has a unique 48‑bit Media Access Control (MAC) address, usually written in hexadecimal:
Example: 00:1A:2B:3C:4D:5E
The MAC address is used for link‑layer addressing on Ethernet and Wi‑Fi.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Length | 32 bits (4 octets) | 128 bits (16 octets) |
| Notation | Decimal dotted‑quad (e.g., 192.168.0.1) | Hexadecimal groups (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334) |
| Number of addresses | ≈ 4.3 × 10⁹ | ≈ 3.4 × 10³⁸ |
| Header size | 20 bytes (minimum) | 40 bytes (fixed) |
| Aspect | Primary (volatile) | Secondary (non‑volatile) |
|---|---|---|
| Typical devices | RAM (DRAM, SRAM) | HDD, SSD, optical discs, USB flash drives |
| Speed | Nanoseconds‑microseconds | Milliseconds (HDD) to microseconds (SSD) |
| Power dependence | Data lost when power is removed | Data retained without power |
| Typical capacity (2025) | 4 GB – 64 GB | 500 GB – 8 TB (HDD) / 256 GB – 4 TB (SSD) |
Create an account or Login to take a Quiz
Log in to suggest improvements to this note.
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.