EX1
Convert 10110₂ to decimal.
Answer: 10110₂ = 16 + 4 + 2 = 22₁₀.
LESSON 03 · FOUNDATIONS
Understand how digital systems represent information with bits.
Computers use physical states to represent information. At the logical level, binary digits (bits) take values 0 and 1. Groups of bits encode numbers, text, images, and instructions according to agreed rules. Learning the representation helps explain memory, storage, and digital logic.
A bit is a binary digit: 0 or 1. A byte is commonly 8 bits, allowing 2⁸ = 256 possible bit patterns. A pattern does not carry meaning by itself; a format determines whether it represents a number, a character, a color component, or something else.
Digital circuits use physical signals with defined ranges interpreted as logical 0 or 1. Real systems must tolerate noise and timing limits; binary representation is an abstraction that makes reliable processing practical.
In base 10, each digit's place represents a power of 10. In base 2, each place represents a power of 2. From right to left, binary place values are 1, 2, 4, 8, 16, and so on.
Binary 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀. The subscript indicates the base and avoids ambiguity.
Repeatedly divide the positive decimal number by 2 and record each remainder. Read the remainders from bottom to top. Example: 13 ÷ 2 gives remainder 1; 6 ÷ 2 gives 0; 3 ÷ 2 gives 1; 1 ÷ 2 gives 1. Reading upward gives 1101₂.
You can check the result by expanding it: 1101₂ = 8 + 4 + 0 + 1 = 13₁₀. For zero, the representation is 0₂.
The basic rules are 0+0=0, 0+1=1, 1+0=1, and 1+1=10₂ (write 0 and carry 1). With a carry, 1+1+1=11₂ (write 1 and carry 1).
Example: 101₂ + 011₂ = 1000₂. In decimal, 5 + 3 = 8, so the result is consistent. Always account for carries from the previous column.
Unsigned n-bit binary can represent integers from 0 through 2ⁿ−1. Four bits represent 16 patterns, from 0000 to 1111. Signed integers require a convention, such as two's complement; floating-point numbers use a different encoding. Text uses character encodings, and images use pixel/color formats.
Do not assume every bit pattern is an ordinary positive integer. The same eight bits can have different meanings under different data types and encodings.
• Reading binary digits as if each position were a power of 10.\n• Reading division remainders from top to bottom instead of bottom to top.\n• Forgetting the carry in binary addition.\n• Assuming 1 byte always means one character in every encoding.\n• Confusing the bit pattern with the format that interprets it.
Try each question before revealing the worked answer.
Convert 10110₂ to decimal.
Answer: 10110₂ = 16 + 4 + 2 = 22₁₀.
Convert decimal 9 to binary.
Answer: 9 = 8 + 1, so 9₁₀ = 1001₂.
Add 11₂ + 01₂.
Answer: 11₂ (3) + 01₂ (1) = 100₂ (4).
What is 1001₂ in decimal?
Choose a topic to help prioritize future learning materials.