DE Notes
Complete guide to the binary number system (base-2) used in digital electronics covering binary counting, conversion, arithmetic operations, and practical applications.
The binary number system is the language of digital electronics and computers. Every piece of digital information is ultimately represented as a sequence of binary digits (bits).
What is the Binary System?
A single binary digit is called a bit. Groups of bits form larger units:
| Unit | Bits | Values |
|---|---|---|
| 1 bit | 1 | 2 values (0, 1) |
| 1 nibble | 4 | 16 values (0-15) |
| 1 byte | 8 | 256 values (0-255) |
| 1 word | 16/32/64 | Varies by architecture |
Positional Notation in Binary
Powers of 2 (Essential Reference)
Binary Counting
Notice the pattern: the rightmost bit toggles every count, the next bit toggles every 2 counts, and so on.
Decimal to Binary Conversion
Method 1: Repeated Division by 2
Convert 45₁₀ to binary:
45 ÷ 2 = 22 remainder 1 (LSB)
22 ÷ 2 = 11 remainder 0
11 ÷ 2 = 5 remainder 1
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1 (MSB)
Read remainders bottom to top: 45₁₀ = 101101₂
Method 2: Subtraction of Powers of 2
Convert 45₁₀ to binary:
| 45 - 32 (2⁵) = 13 | bit 5 = 1 |
| 13 - 16 (2⁴) = negative, skip | bit 4 = 0 |
| 13 - 8 (2³) = 5 | bit 3 = 1 |
| 5 - 4 (2²) = 1 | bit 2 = 1 |
| 1 - 2 (2¹) = negative, skip | bit 1 = 0 |
| 1 - 1 (2⁰) = 0 | bit 0 = 1 |
| Result | 101101₂ |
Fractional Conversion: Repeated Multiplication by 2
Convert 0.625₁₀ to binary:
| 0.625 × 2 = 1.250 | integer part = 1 (MSB of fraction) |
| 0.250 × 2 = 0.500 | integer part = 0 |
| 0.500 × 2 = 1.000 | integer part = 1 (LSB of fraction) |
| Result | 0.625₁₀ = 0.101₂ |
Binary to Decimal Conversion
Convert 11010.11₂ to decimal:
Binary Arithmetic
Binary Addition
Binary Subtraction
Binary Multiplication
MSB and LSB
Practical Application: IP Address
| IP Address | 192.168.1.1 |
| 192 in binary | 11000000 |
| 168 in binary | 10101000 |
| 1 in binary | 00000001 |
| 1 in binary | 00000001 |
| Full binary | 11000000.10101000.00000001.00000001 |
| Total | 32 bits |
Interview Questions
Q1: What is the maximum decimal value that can be represented with n bits? The maximum value with n bits in unsigned representation is 2ⁿ - 1. For example, 8 bits can represent 0 to 255 (2⁸ - 1 = 255). The total number of unique values representable is 2ⁿ.
Q2: Convert 0.1₁₀ to binary. Does it terminate? 0.1 × 2 = 0.2 → 0; 0.2 × 2 = 0.4 → 0; 0.4 × 2 = 0.8 → 0; 0.8 × 2 = 1.6 → 1; 0.6 × 2 = 1.2 → 1; 0.2 × 2 = 0.4 → 0 (repeats). Result: 0.0001100110011... It does NOT terminate — this is why floating-point has precision issues with 0.1.
Q3: Why is binary used in digital computers instead of higher bases like base-3 or base-10? Binary (base-2) requires only two distinguishable states per digit, maximizing noise immunity. Higher bases would need more voltage levels to distinguish, reducing noise margin. Also, Boolean algebra provides an elegant mathematical framework for binary logic design. Two-state devices (transistors as switches) are simple and reliable to manufacture.
Q4: What is the difference between MSB and LSB? Why does it matter? MSB (Most Significant Bit) carries the highest weight (2ⁿ⁻¹) and LSB carries the lowest weight (2⁰). MSB determines the magnitude range of the number. In signed representation, MSB indicates the sign. Bit ordering (endianness) — whether MSB or LSB is transmitted/stored first — matters for data communication and memory storage.
Q5: How does binary addition relate to logic gates? A binary half-adder uses an XOR gate for the sum bit and an AND gate for the carry bit. A full adder extends this with carry input. These gate-level implementations directly realize binary addition in hardware, forming the basis of ALUs in processors.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Binary Number System — Digital Electronics.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Digital Electronics topic.
Search Terms
digital-electronics, digital electronics, digital, electronics, number, systems, binary, system
Related Digital Electronics Topics