PHY 452 · Electronics
Our notes
2 min readCombinational and sequential
- Combinational: output depends only on present inputs (no memory).
- Sequential: output also depends on past inputs (has memory: flip-flops).
Adders
- Half adder: adds two bits. Sum S = A ⊕ B; Carry C = AB.
- Full adder: adds two bits plus a carry in: S = A ⊕ B ⊕ Cin; Cout = AB + Cin(A ⊕ B). Two half adders and an OR gate make a full adder.
- Ripple-carry adder: n full adders in a chain for n-bit numbers; simple but slow because the carry ripples through each stage.
- Carry look-ahead adder: computes carries in parallel; faster.
- Subtraction: add the two's complement (invert B with XOR gates and set Cin = 1). One circuit adds and subtracts, as in a processor's ALU.
Comparator
Compares two numbers: outputs A > B, A = B, A < B. One-bit equality is XNOR.
Multiplexer (data selector)
Selects one of 2^n inputs to a single output using n select lines. A 4-to-1 MUX: Y = S1'S0'I0 + S1'S0 I1 + S1 S0' I2 + S1 S0 I3. Uses: routing data, parallel-to-serial conversion, and building any logic function.
Demultiplexer
One input sent to one of 2^n outputs chosen by select lines.
Decoder
n inputs to 2^n outputs, one active for each input code. A 3-to-8 decoder selects one of eight memory chips from three address bits. A BCD-to-7-segment decoder drives digital displays (segments a to g).
Encoder
The reverse: 2^n inputs to an n-bit code. A priority encoder gives the code of the highest active input (keyboard interfaces, interrupt controllers).
Seven-segment displays
- Common cathode: segment lights with a HIGH input.
- Common anode: segment lights with a LOW input.
Current-limiting resistors protect each LED segment.
Parity generators and checkers
XOR chains give the parity of a word for error detection.
Integrated circuits
Standard ICs (74xx series): 7400 quad NAND, 7408 AND, 7432 OR, 7486 XOR, 7483 4-bit adder, 74151 multiplexer, 74138 3-to-8 decoder, 7447 BCD-to-7-segment driver.
Exams usually ask
- Design a half adder and a full adder; write their expressions.
- Explain the operation of a multiplexer and a decoder.
Common mistake
Writing the full adder carry as A + B + Cin. The carry is AB + Cin(A ⊕ B): it is 1 when at least two inputs are 1.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
No reading links here yet
Our team adds free books, videos and practice for each topic, and opens every link before it goes up.