Mada za sehemu hiiDemonstrate understanding of the principles of computer architecture and organisationMada 7
- Describe the classification of computer architecture (Von Neumann and Non Von Neumann, Harvard Architecture, Modified Harvard Architecture, Flynn's Taxonomy)
- Demonstrate understanding of Boolean algebra and logic gates (Logic expressions, standard logic gate symbols, logic circuits)
- Explore computer memory (Meaning, design principles, memory hierarchy and interfacing, cache memory, memory mapping, primary & secondary memory)
- Analyse instruction set architecture (Instruction set types, registers, instruction execution cycles, addressing modes, register transfer language, ARM and x86 architectures)
- Describe I/O system (Direct Memory Access, Interrupt and exception, privileged / non privileged instruction)
- Demonstrate function of memory and input-output system
- Develop understanding of pipelining (Basics, types, stalling & forwarding, throughput and speedup, hazards) and Instruction Level Parallelism (concept, compilation techniques, scalar versus superscalar pipelining, branch prediction, register renaming) and thread and data level parallelism
Boolean Algebra and Logic Gates
Boolean algebra is a mathematical system used to represent the relationship between the inputs and outputs of a logic circuit. It operates on only two values: 0 and 1, where 0 represents a FALSE condition (such as no voltage or switch OFF) and 1 represents a TRUE condition (such as voltage present or switch ON). This system is fundamental to how computers process information, as all data in digital systems is represented using binary digits.
Boolean algebra has three fundamental operations: OR, AND, and NOT. These operations form the foundation for all digital logic circuits.
Logical Addition (OR)
The OR operation uses the logical symbol "+" and the OR operator. For variables A and B, the expression A + B (read as "A OR B") produces an output of 1 when at least one input is 1. The truth table for OR is:
| A | B | A + B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
This operation is similar to having two switches in parallel where the light turns on if either switch is ON.
Logical Multiplication (AND)
The AND operation uses the logical symbol "·" or simply writes variables together. For variables A and B, the expression A·B (read as "A AND B") produces an output of 1 only when both inputs are 1. The truth table for AND is:
| A | B | A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
This operation is like having two switches in series where both must be ON for the light to illuminate.
Logical Negation (NOT)
The NOT operation inverts the input signal. If input A is 1, the output is 0, and vice versa. The output is written as Ā or NOT A. The truth table for NOT is:
| A | Ā |
|---|---|
| 0 | 1 |
| 1 | 0 |
The NOT gate is also called an inverter because it converts 0 to 1 and 1 to 0.
These laws help simplify Boolean expressions and reduce the number of logic gates needed in circuits.
Basic Laws
Commutative Law:
Associative Law:
Distributive Law:
Identity Laws
Idempotent Laws
Annulment Laws
Complementary Laws
Double Complementary Law
Boolean expression simplification reduces the number of logic gates required to implement a circuit, which decreases power consumption and heat generation.
Worked Example 1
Simplify the expression:
Solution:
| Step | Expression | Law Applied |
|---|---|---|
| 1 | Original expression | |
| 2 | Distributive | |
| 3 | Idempotent () | |
| 4 | Distributive | |
| 5 | Annulment () | |
| 6 | Distributive | |
| 7 | Annulment () |
The simplified expression is .
A truth table shows all possible combinations of input values and their corresponding output values for a Boolean expression.
Construction Steps
Step 1: Determine the number of variables. For n variables, there are rows.
Step 2: List all possible combinations of inputs. For the first column, write half zeros and half ones. For the second column, alternate in pairs.
Step 3: Create columns for each term in the expression and evaluate.
Step 4: Determine the final output column.
Worked Example 2
Create a truth table for
Solution:
| A | B | ĀB | AB | X |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 |
DeMorgan's theorem provides rules for inverting Boolean expressions.
First Theorem (OR form):
Second Theorem (AND form):
Worked Example 3
Simplify using DeMorgan's theorem.
Solution:
Let
Apply DeMorgan's:

Logic gates are electronic circuits that perform logical operations on binary inputs.
OR Gate
- Symbol: Curved input side, pointed output side
- Output is 1 if any input is 1
- Expression:
AND Gate
- Symbol: Flat input side, curved output side
- Output is 1 only if all inputs are 1
- Expression:
NOT Gate (Inverter)
- Symbol: Triangle with a small circle at the output
- Single input, inverts the signal
- Expression:
NAND Gate
- Output is the complement of AND
- Output is 0 only when all inputs are 1
- Expression:
NOR Gate
- Output is the complement of OR
- Output is 1 only when all inputs are 0
- Expression:
XOR Gate (Exclusive OR)
- Output is 1 when inputs are different
- Expression:
A logic circuit combines two or more logic gates to perform complex operations.
Drawing Circuits from Boolean Expressions
To draw a circuit from an expression:
- Identify the input variables
- Determine the order of operations (NOT first, then AND, then OR)
- Draw gates for each operation, connecting outputs to inputs as required
Worked Example 4
Draw the circuit for
Solution:
- First, AND gate for B and C
- Then, OR gate to combine A with the result of B·C
Half Adder
A half adder adds two binary digits and produces Sum and Carry outputs.
Truth Table:
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Boolean Expressions:
The Sum output is produced by an XOR gate, and the Carry output by an AND gate.
Full Adder
A full adder adds three bits (two significant bits plus a carry from the previous position).
Boolean Expressions:
In Tanzania, logic gates are used in everyday devices such as traffic light controllers at major intersections in Dar es Salaam and other cities. These controllers use combinational logic circuits to manage the sequence of green, yellow, and red lights based on timing and sensor inputs, ensuring safe traffic flow. Additionally, security alarm systems in homes and businesses use AND and OR gates to trigger alerts only when specific conditions are met, such as when a door sensor detects opening (input A) AND the main switch is armed (input B).
Swali
What is the output of the expression Y = A · B when A = 1 and B = 0?
Ingia ili kuwasilisha jibu lako na lihesabiwe katika umahiri wako.
Ingia ili kufanya mazoeziMwalimu
Umekwama? Niulize chochote kuhusu mada hii.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu swali hili.
Ingia ili kuuliza