Number Systems & Boolean Algebra: Solved TU Board Questions & Step-by-Step Conversions
Author: Bhuban Subedi | Subject: Computer Fundamentals & Applications (CACS101) | Semester: First Semester
In the Tribhuvan University (TU) BCA First Semester, Computer Fundamentals & Applications (CACS101) lays the computational groundwork for every software engineer.
While theoretical questions about hardware generations and operating system types require descriptive answers, the numerical and logic simplification section is where you can score 100% full marks if you follow exact step-by-step mathematical procedures.
In this comprehensive guide, we will cover base conversions (Binary, Octal, Decimal, Hexadecimal with fractional parts), 1’s and 2’s complement arithmetic, essential Boolean algebra laws (including De Morgan’s theorems), and solve high-frequency TU board questions.
1. Summary of Computer Number Systems
Every digital computer operates on positional numeral systems where each digit’s value is determined by the digit itself, its position, and the radix (base) of the system.
+---------------+-------+---------------------------------------+-----------------------------+
| Number System | Radix | Allowed Digits / Symbols | Example Representation |
+---------------+-------+---------------------------------------+-----------------------------+
| Binary | 2 | 0, 1 | $(11010.11)_2$ |
| Octal | 8 | 0, 1, 2, 3, 4, 5, 6, 7 | $(357.24)_8$ |
| Decimal | 10 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | $(249.75)_{10}$ |
| Hexadecimal | 16 | 0-9 and A=10, B=11, C=12, D=13, E=14, F=15 | $(3FA.C8)_{16}$ |
+---------------+-------+---------------------------------------+-----------------------------+
2. Step-by-Step Base Conversion Rules
A. Decimal to Any Base ($R$)
- Integer Part: Repeatedly divide by the target base $R$ and record the remainders. Read remainders from bottom to top (MSB to LSB).
- Fractional Part: Repeatedly multiply the fraction by the target base $R$ and record the integer part. Read from top to bottom.
Solved TU Problem: Convert $(53.625)_{10}$ to Binary
- Integer Part (53):
- $53 \div 2 = 26 \text{ remainder } 1 \quad (\text{LSB})$
- $26 \div 2 = 13 \text{ remainder } 0$
- $13 \div 2 = 6 \text{ remainder } 1$
- $6 \div 2 = 3 \text{ remainder } 0$
- $3 \div 2 = 1 \text{ remainder } 1$
- $1 \div 2 = 0 \text{ remainder } 1 \quad (\text{MSB})$
-
Result: $(110101)_2$
-
Fractional Part (0.625):
- $0.625 \times 2 = 1.250 \rightarrow \text{Integer } 1$
- $0.250 \times 2 = 0.500 \rightarrow \text{Integer } 0$
- $0.500 \times 2 = 1.000 \rightarrow \text{Integer } 1$
- Result: $(0.101)_2$
$$\mathbf{(53.625)_{10} = (110101.101)_2}$$
B. Binary to Octal & Hexadecimal (Grouping Method)
- Binary to Octal: Group bits in sets of 3 bits starting from the radix point (left for integer, right for fraction).
- Binary to Hexadecimal: Group bits in sets of 4 bits starting from the radix point.
Solved Example: Convert $(11011011101.101101)_2$ to Hexadecimal
- Integer grouping (pad leading 0s if needed):
011011011101$\rightarrow$ $6, \text{D}, \text{D}$- Fractional grouping (pad trailing 0s if needed):
10110100$\rightarrow$ $\text{B}, 4$
$$\mathbf{(11011011101.101101)2 = (6\text{DD}.\text{B}4)$$}
3. Signed Binary Arithmetic: 1’s and 2’s Complement
Computers use 2’s complement representation to perform subtraction using pure addition hardware.
Definitions:
- 1’s Complement: Invert all bits ($0 \rightarrow 1$ and $1 \rightarrow 0$).
- 2’s Complement: Take 1’s Complement and add $1$.
Subtraction Rule using 2’s Complement ($A – B$):
- Represent both numbers in $N$-bit binary.
- Find the 2’s complement of the subtrahend ($B$).
- Add $A + (\text{2’s complement of } B)$.
- If Carry is generated: Discard the carry. The result is positive and in true binary form.
- If No Carry is generated: The result is negative and in 2’s complement form. Take the 2’s complement of the answer and prepend a negative sign.
Solved TU Board Question: Subtract $(14){10} – (25)$ using 8-bit 2’s complement
- $A = 14 = (00001110)_2$
-
$B = 25 = (00011001)_2$
-
Find 2’s complement of $B$ (25):
- 1’s complement of $00011001 = 11100110$
-
2’s complement $= 11100110 + 1 = 11100111$
-
Add $A$ and 2’s complement of $B$:
$$\begin{array}{r@{\quad}l}
00001110 & (14) \ -
11100111 & (\text{2’s comp of } 25) \
\hline
11110101 & (\text{Sum})
\end{array}$$ -
Analysis: No end carry generated $\implies$ Result is negative.
- Take 2’s complement of $11110101$:
- 1’s comp $= 00001010$
- 2’s comp $= 00001010 + 1 = 00001011 = (11)_{10}$
$$\mathbf{Result = – (11)_{10}}$$
4. Fundamental Boolean Algebra Theorems
Boolean algebra governs digital circuit optimization.
+------------------------------------+------------------------------------+
| Law / Theorem | Boolean Expression Form |
+------------------------------------+------------------------------------+
| Identity Law | $A + 0 = A \quad\mid\quad A \cdot 1 = A$ |
| Null / Dominance Law | $A + 1 = 1 \quad\mid\quad A \cdot 0 = 0$ |
| Idempotent Law | $A + A = A \quad\mid\quad A \cdot A = A$ |
| Complement Law | $A + A' = 1 \quad\mid\quad A \cdot A' = 0$ |
| Involution Law | $(A')' = A$ |
| Commutative Law | $A + B = B + A \quad\mid\quad A \cdot B = B \cdot A$ |
| Associative Law | $A + (B + C) = (A + B) + C$ |
| Distributive Law | $A(B + C) = AB + AC$ |
| | $A + BC = (A + B)(A + C)$ (Crucial TU Exam Identity!) |
| Absorption Law | $A + AB = A \quad\mid\quad A(A + B) = A$ |
| De Morgan’s Laws | $(A + B)' = A' \cdot B'$ |
| | $(A \cdot B)' = A' + B'$ |
+------------------------------------+------------------------------------+
5. Solved Board Simplification Problem
Board Question:
“Simplify the following Boolean expression using Boolean algebra laws and draw the equivalent logic circuit:”
$$F = AB + A(B + C) + B(B + C)$$
Step-by-Step Proof:
- Apply distributive law to expand brackets:
$$F = AB + AB + AC + BB + BC$$ - Apply Idempotent law ($AB + AB = AB$ and $BB = B$):
$$F = AB + AC + B + BC$$ - Rearrange terms:
$$F = B + AB + BC + AC$$ - Apply Absorption law ($B + AB = B$):
$$F = B + BC + AC$$ - Apply Absorption law again ($B + BC = B$):
$$F = B + AC$$
$$\mathbf{Simplified\ Form: F = B + AC}$$
Logic Circuit:
A ---+
|--- [AND Gate] ---> (AC) ---+
C ---+ |--- [OR Gate] ---> F = B + AC
|
B --------------------------------+
Frequently Asked Questions (FAQ)
Q1: Why is 2’s complement preferred over 1’s complement in modern ALU design?
1’s complement has two representations for zero ($+0 = 0000$ and $-0 = 1111$), which requires additional comparison hardware. 2’s complement has a single unique representation for zero ($00000000$) and simplifies addition/subtraction circuitry without requiring end-around carry correction.
Q2: What are Universal Gates and why are they important?
NAND and NOR are called universal logic gates because any digital logic function (AND, OR, NOT, XOR, XNOR) can be implemented using combinations of only NAND or only NOR gates, significantly reducing manufacturing costs.



