Boolean Algebra (OCR A-Level Computer Science): Revision Notes
Adder Circuits
Overview
Adder circuits are fundamental components in digital electronics used for binary addition, a key operation in computer systems. They are commonly found in arithmetic logic units (ALUs), performing essential tasks like addition, subtraction, and other arithmetic operations. This note will cover the two main types of adder circuits: half adders and full adders, explaining their purpose, structure, and how they work.
Purpose of Adder Circuits
Adder circuits are designed to perform the addition of binary numbers:
- A single binary addition involves two bits (e.g., 0 + 1) and may produce a carry.
- When adding multi-bit binary numbers, carry bits must be accounted for, making adder circuits crucial for this process.
Half Adder
A half-adder adds two single-bit binary numbers but cannot handle carry input from a previous operation.
Inputs:
- = First binary digit.
- = Second binary digit.
Outputs:
- Sum (): The result of
- Carry (): The carry-out bit, which is 1 if produces a carry.
Logic Gates:
- Sum (): XOR gate ().
- Carry (): AND gate ().
Truth Table:
| Sum () | Carry () | ||
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Full Adder
A full adder adds three binary inputs: two data bits and a carry bit from a previous addition. This makes it suitable for multi-bit binary addition.
Inputs:
- : First binary digit.
- : Second binary digit.
- : Carry-in from the previous bit's addition.
Outputs:
- Sum (): The result of
- Carry-out (): The carry to the next stage.
Logic Gates:
Sum (S):
Carry-out ():
Truth Table:
| Sum () | Carry-out () | |||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Example Diagrams
Half Adder Circuit:
- Sum (): XOR gate.
- Carry (): AND gate.
Full Adder Circuit:
- Sum (): Two XOR gates.
- Carry-out (): Two AND gates and one OR gate.
Note Summary
Common Mistakes
- Confusing Half and Full Adders: Half adders do not account for carry-in, while full adders do. Ensure you use the correct circuit for multi-bit additions.
- Incorrect Logic Gate Configuration: Misplacing XOR and AND gates can lead to incorrect sums or carries. Always follow the proper configurations.
- Misinterpreting Truth Tables: You can sometimes misread or incorrectly fill out truth tables. Double-check each row based on the inputs and corresponding outputs.
Key Takeaways
- Half adders perform binary addition of two bits but lack a carry-in input.
- Full adders handle the binary addition of three inputs, including carry-in, making them suitable for adding multi-bit numbers.
- Both adder circuits rely on XOR, AND, and OR gates for their operations.
- Understand how to read and construct the truth tables for each type of adder.