Free Study Material
Every number you've ever written uses one particular counting system without thinking about it. This topic names that system formally, and introduces the others a computer actually uses internally.
A number system is a way of representing numbers using a fixed set of symbols. Its base (or radix) is how many symbols it uses before it needs to reuse them with a new position. CBSE covers four:
0–9.0 and 1.0–7.0–9, then letters A–F for the values 10–15.Every number system works the same underlying way: each digit's position has a place value, based on a power of the base. In decimal, 243 means (2 × 10²) + (4 × 10¹) + (3 × 10⁰) — hundreds, tens, and ones. The exact same idea, just with a different base, is what the next topic uses to convert between systems.
Computers use binary specifically because it maps onto something physically simple and reliable: a transistor or a memory cell is naturally either carrying current or not — two stable states, matching binary's two digits exactly. Octal and hexadecimal exist mainly as a shorthand for binary, not because hardware uses them directly — a long string of binary digits is hard for a person to read, and both octal and hex compress it into a much shorter, more manageable form (covered fully in the next two topics).
Note: "Base" and "radix" mean exactly the same thing in this chapter — CBSE uses both terms interchangeably, so recognise either one.
A number system represents numbers using a fixed set of symbols, sized by its base: Decimal (10 symbols), Binary (2 symbols), Octal (8 symbols), Hexadecimal (16 symbols). Every system assigns each digit a place value based on a power of its base — computers use binary internally because it matches a circuit's two stable physical states.
Humans typically use the Decimal System (Base-10) because we have ten fingers. However, digital circuits are made of switches that only have two states: ON or OFF. To bridge this gap, we use different Number Systems. A number system is simply a way to represent values using a specific set of symbols called Digits.
| System Name | Base (Radix) | Allowed Digits/Symbols | Common Use |
|---|---|---|---|
| Binary | 2 | 0, 1 | Internal Computer Logic |
| Octal | 8 | 0, 1, 2, 3, 4, 5, 6, 7 | Shorthand for Binary |
| Decimal | 10 | 0 to 9 | Human Interaction |
| Hexadecimal | 16 | 0-9, A, B, C, D, E, F | Memory Addresses / Color Codes |
Every digit in a number has a positional value based on the base. For a number 52610
In Binary, the weights would be powers of 2 (1, 2, 4, 8, 16...). In Hexadecimal, they are powers of 16.
Now that you know binary uses place values based on powers of 2, this topic covers converting a number between decimal and binary in both directions.
Repeatedly divide the decimal number by 2, writing down each remainder, until the quotient reaches 0. The binary result is every remainder read from bottom to top (last remainder found first, in the answer).
Multiply each binary digit by its place value (a power of 2, starting at 2⁰ for the rightmost digit) and add all the results together.
Convert 25 (decimal) to binary:
| Step | Division | Quotient | Remainder |
|---|---|---|---|
| 1 | 25 ÷ 2 | 12 | 1 |
| 2 | 12 ÷ 2 | 6 | 0 |
| 3 | 6 ÷ 2 | 3 | 0 |
| 4 | 3 ÷ 2 | 1 | 1 |
| 5 | 1 ÷ 2 | 0 | 1 |
Reading the remainders from bottom to top gives 11001. So 25 in decimal is 11001 in binary.
Convert 11001 (binary) back to decimal, to check the answer: (1 × 2⁴) + (1 × 2³) + (0 × 2²) + (0 × 2¹) + (1 × 2⁰) = 16 + 8 + 0 + 0 + 1 = 25
The two directions confirm each other — this cross-check is always worth doing after any conversion.
Note: The division stops the moment the quotient reaches0, not before — the very last remainder produced (from dividing1by2in the example above) becomes the leftmost digit of the binary answer, since remainders are read bottom to top.
The division method works because it's finding the coefficients of a base-2 place-value expansion, one digit at a time, from the smallest place value upward — which is exactly why the remainders come out in reverse order and need to be read from bottom to top to get the correct final answer.
Decimal to binary: repeatedly divide by 2, and read the remainders bottom to top. Binary to decimal: multiply each digit by its place value (a power of 2) and add the results — the two conversions are exact reverses of each other, useful for checking your own work.
Computers use Binary (Base-2) because their circuits consist of billions of tiny switches. These switches can only be ON (1) or OFF (0). Translating our Decimal numbers into Binary is how we "talk" to the hardware.
To convert, divide the decimal number by 2 and track the remainders.
| Calculation | Quotient | Remainder |
|---|---|---|
| 25 ÷ 2 | 12 | 1 (LSB) |
| 12 ÷ 2 | 6 | 0 |
| 6 ÷ 2 | 3 | 0 |
| 3 ÷ 2 | 1 | 1 |
| 1 ÷ 2 | 0 | 1 (MSB) |
Multiply each bit by 2position, starting from position 0 on the right.
Example: (1011)2
= (1 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
= (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1)
= 8 + 0 + 2 + 1
= (11)10
Octal and hexadecimal follow the exact same two conversion methods you just used for binary — division for decimal-to-X, place value for X-to-decimal — just with a different base. This topic applies both, then covers the fast shortcut between binary and these two systems specifically.
8, read remainders bottom to top.16, read remainders bottom to top (remainders 10–15 are written as A–F).8, or of 16) and add the results.Because 8 = 2³ and 16 = 2⁴, binary converts to octal and hex directly, without going through decimal at all:
Convert 100 (decimal) to hexadecimal: 100 ÷ 16 = 6 remainder 4; 6 ÷ 16 = 0 remainder 6. Reading bottom to top: 100 decimal is 64 in hexadecimal.
Convert 11010110 (binary) to hexadecimal using grouping: Group into sets of 4 from the right: 1101 and 0110. 1101 = 13 = D; 0110 = 6. So 11010110 in binary is D6 in hexadecimal — no decimal step needed at all.
Note: When grouping from the right leaves a leftover group with fewer than 3 (for octal) or 4 (for hex) digits, pad it with leading zeros — they don't change the value, only make the group the right size to convert.
The grouping shortcut works because each hex digit already represents exactly 4 binary digits' worth of information (2⁴ = 16, hex's full digit range) — the two systems line up perfectly, digit group for digit group, which is exactly why programmers use hexadecimal as a compact, readable stand-in for long binary values instead of writing binary out in full.
Decimal-to-octal/hex uses the same division method as decimal-to-binary, just with 8 or 16. Binary converts directly to octal (groups of 3 bits) or hexadecimal (groups of 4 bits) without needing to pass through decimal, because 8 and 16 are themselves powers of 2.
Binary strings are long and difficult to manage. Because 8 and 16 are exact powers of 2 (23 and 24), we can group binary bits into single digits. This makes memory addresses and machine code much easier for humans to read.
In Base-16, we use letters A-F to represent values from 10 to 15.
| Decimal | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|
| Hex | A | B | C | D | E | F |
Split the binary number into sets of 3 from right to left.
Split the binary number into sets of 4 from right to left.
Number systems represent numbers. This closing topic covers how a computer represents text — every character you type is actually stored as a number too, using an agreed-upon encoding scheme.
An encoding scheme is a fixed table that assigns a unique numeric code to every character it supports.
128 possible values, covering English letters (upper and lower case), digits, and common punctuation.The letter A has the ASCII code 65. The letter a (lowercase) has the ASCII code 97. Because ASCII assigns consecutive codes to consecutive letters, B is 66, C is 67, and so on — this consistent, predictable spacing is exactly what makes operations like sorting text alphabetically work correctly at the character level: the computer is really just comparing these underlying numbers.
Note: ASCII's 7 bits give exactly 2⁷ = 128 possible codes — enough for English text and common symbols, but nowhere near enough for every script in the world, which is exactly the gap ISCII and then Unicode were each built to close.
ASCII, ISCII, and Unicode exist as three points along the same widening need: ASCII covered English; ISCII extended that specifically for Indian languages by using the extra values an 8th bit provides; Unicode then went further still, aiming to cover every language's script in one single scheme, so that text from any language in the world can be represented, and exchanged between systems, without ambiguity about which encoding was used.
An encoding scheme assigns a unique number to every character. ASCII (7-bit, 128 codes) covers English text; ISCII (8-bit) extends it for Indian scripts; Unicode is a much larger, universal scheme aiming to represent every language's characters in one consistent standard.
Computers cannot "see" letters; they only see 1s and 0s. Encoding is the process of assigning a unique numeric code to every character on your keyboard. Without these standards, a "A" typed on one computer might show up as a "%" on another.
| Character | Decimal | Character | Decimal | Character | Decimal |
|---|---|---|---|---|---|
| Space | 32 | A - Z | 65 - 90 | [ | 91 |
| ! | 33 | a - z | 97 - 122 | \ | 92 |
| " | 34 | 0 - 9 | 48 - 57 | ] | 93 |
| # | 35 | $ | 36 | ^ | 94 |
| % | 37 | & | 38 | _ | 95 |
| ( | 40 | ) | 41 | @ | 64 |
Developed in India to represent various Indian languages like Hindi, Marathi, and Tamil in digital format. It is an 8-bit code.
The modern world standard. It provides a unique number for every character across every language, including Emojis! It can use 8, 16, or 32 bits (UTF-8, UTF-16, UTF-32).