CS132 - Boolean and Digital Logic

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/86

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:26 PM on 6/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

87 Terms

1
New cards

What is combinational logic?

Logic with no memory; outputs depend only on current inputs.

2
New cards

What is sequential logic?

Logic with memory; outputs can depend on current inputs and previous state.

3
New cards

Give examples of combinational logic.

Logic gates, adders, decoders, encoders, multiplexers and demultiplexers.

4
New cards

Give examples of sequential logic.

Latches, flip-flops, registers, shift registers and counters.

5
New cards

What is a truth table?

A table showing every possible input combination and the output for each one.

6
New cards

For n inputs, how many truth-table rows are there?

2^n rows.

7
New cards

What is Sum of Products (SOP)?

A Boolean expression formed by OR-ing product terms from rows where the output is 1.

8
New cards

How do you form SOP from a truth table?

Use rows where output is 1; write variables normally for 1 and complemented for 0; AND them in each row; OR the terms.

9
New cards

What is Product of Sums (POS)?

A Boolean expression formed by AND-ing sum terms from rows where the output is 0.

10
New cards

What is De Morgan's law for NOT(A AND B)?

NOT(A AND B) = NOT A OR NOT B.

11
New cards

What is De Morgan's law for NOT(A OR B)?

NOT(A OR B) = NOT A AND NOT B.

12
New cards

What is a Karnaugh map?

A 2D arrangement of truth-table outputs used to simplify Boolean expressions.

13
New cards

Why do K-maps use Gray code ordering?

Adjacent cells differ by only one input bit, making valid grouping possible.

14
New cards

What order should 2-bit K-map labels use?

00, 01, 11, 10.

15
New cards

How do you simplify using a K-map?

Fill outputs, group 1s in largest power-of-2 rectangles, allow wraparound/overlap, keep variables that do not change, OR group terms.

16
New cards

What sizes can K-map groups have?

Powers of 2: 1, 2, 4, 8, etc.

17
New cards

Can K-map groups wrap around edges?

Yes. Edge cells can be adjacent because the map wraps.

18
New cards

What is a don't-care condition on a K-map?

An input combination where the output does not matter; it can be treated as 0 or 1 to simplify the expression.

19
New cards

Give a K-map limitation.

XOR-style checkerboard patterns may not simplify well with normal grouping.

20
New cards

What is a universal gate?

A gate type that can be used to build any other logic gate.

21
New cards

Which gates are universal?

NAND and NOR.

22
New cards

Why use only one type of universal gate?

Simpler manufacturing, standardised design and easier power-characteristic management.

23
New cards

Why might using only NOR/NAND be bad?

It may require more gates, increasing delay, area, power use and diagram complexity.

24
New cards

How do you make NOT A using NOR?

A NOR A.

25
New cards

How do you make A OR B using NOR only?

(A NOR B) NOR (A NOR B).

26
New cards

How do you make A AND B using NOR only?

(A NOR A) NOR (B NOR B).

27
New cards

What does XOR output?

1 when the two inputs are different; 0 when they are the same.

28
New cards

What is a half adder?

A circuit that adds two bits and produces Sum and Carry, but has no carry-in.

29
New cards

Half adder equations?

Sum = A XOR B. Carry = A AND B.

30
New cards

What is a full adder?

A circuit that adds A, B and carry-in, producing Sum and carry-out.

31
New cards

Full adder Sum equation?

Sum = A XOR B XOR Cin.

32
New cards

Full adder carry-out equation?

Cout = AB + A.Cin + B.Cin.

33
New cards

How do you make an N-bit full adder?

Chain N one-bit full adders; carry-out from each stage goes to carry-in of the next.

34
New cards

Draw/describe an N-bit full adder-subtractor.

Use N full adders. XOR each B bit with control Z. Use Z as carry-in to the first full adder. Z=0 adds; Z=1 subtracts using two's complement.

35
New cards

What technique does the adder-subtractor use?

Two's complement subtraction.

36
New cards

What is a decoder?

A combinational circuit that converts an n-bit binary input into one selected output line among 2^n outputs.

37
New cards

What is an encoder?

The opposite of a decoder: it converts one selected input line into an n-bit binary output.

38
New cards

What is a multiplexer?

A circuit that selects one of many inputs and connects it to one output.

39
New cards

What is a demultiplexer?

A circuit that routes one input to one of several outputs using select lines.

40
New cards

Decoder vs demultiplexer?

A decoder converts binary code to a selected line; a demux routes an input signal to a selected output.

41
New cards

Multiplexer vs demultiplexer?

A mux routes many inputs to one output; a demux routes one input to one selected output.

42
New cards

What is 3-state logic?

Logic with outputs 0, 1 or high impedance/disconnected.

43
New cards

Why is 3-state logic useful on buses?

Many components can connect to one bus, but disabled components are disconnected so only one drives the bus at a time.

44
New cards

What happens if two devices drive a bus at once?

Incorrect behaviour or a short circuit can occur if one drives 1 and another drives 0.

45
New cards

How can an active-high 1-to-4 demux use 3-state logic?

Use a 2-to-4 decoder on select lines. Use decoder outputs to enable four 3-state buffers. Feed input X to all buffers; only the selected output is driven.

46
New cards

What is an SR latch?

A sequential circuit that stores one bit using Set and Reset inputs with Q and NOT Q outputs.

47
New cards

For an active-low NAND SR latch, what input sets Q=1?

Sbar=0 and Rbar=1.

48
New cards

For an active-low NAND SR latch, what input resets Q=0?

Sbar=1 and Rbar=0.

49
New cards

For an active-low NAND SR latch, what input holds the previous value?

Sbar=1 and Rbar=1.

50
New cards

For an active-low NAND SR latch, what input is invalid?

Sbar=0 and Rbar=0.

51
New cards

What is a D latch?

A level-sensitive one-bit storage circuit where Q follows D while Enable is active and holds when Enable is inactive.

52
New cards

Why is a D latch useful compared with an SR latch?

It avoids the invalid SR input combination.

53
New cards

What does transparent mean for a latch?

While Enable is active, changes at D pass through to Q.

54
New cards

What is a rising clock edge?

The clock transition from 0 to 1.

55
New cards

What is a falling clock edge?

The clock transition from 1 to 0.

56
New cards

Latch vs flip-flop?

A latch is level-sensitive; a flip-flop is edge-triggered.

57
New cards

What is a D flip-flop?

An edge-triggered one-bit storage element that copies D to Q only on the active clock edge.

58
New cards

What is an N-bit register?

N D flip-flops in parallel storing N bits on the same active clock edge.

59
New cards

What is a shift register?

A chain of flip-flops that shifts serial input data along one bit per clock edge.

60
New cards

Why use a shift register instead of a normal register for serial data?

It can receive one bit at a time and build up a parallel stored value.

61
New cards

What is a counter?

A sequential circuit that counts clock pulses, often using flip-flops.

62
New cards

How many bits are needed to count 8 states?

3 bits, because 3 bits represent 0 to 7.

63
New cards

Design a serial byte receiver using shift register and counter.

Use an 8-bit shift register for incoming bits and a 3-bit counter for clock pulses. After 8 pulses, output byte_complete=1 and expose the 8 register outputs.

64
New cards

What is a PAL?

Programmable Array Logic; an early programmable logic device, usually programmable once.

65
New cards

What is a PLA?

Programmable Logic Array with programmable AND and OR arrays to implement Boolean expressions.

66
New cards

What is an FPGA?

Field Programmable Gate Array; many configurable logic blocks and programmable connections, enough to implement complex circuits.

67
New cards
What two transistor types are used in CMOS?
pMOS and nMOS.
68
New cards
What is the basic idea of CMOS logic?
One transistor network pulls the output high and the other pulls the output low.
69
New cards
Why is CMOS widely used?
It has low static power consumption because ideally there is not a continuous path from supply voltage to ground when stable.
70
New cards
When does an nMOS transistor turn on?
When its gate input is high.
71
New cards
What is an nMOS transistor good at?
Pulling an output down to 0.
72
New cards
When does a pMOS transistor turn on?
When its gate input is low.
73
New cards
What is a pMOS transistor good at?
Pulling an output up to 1.
74
New cards
What happens in a CMOS inverter when input A = 0?
pMOS turns on, nMOS turns off, and output Y is pulled high to 1.
75
New cards
What happens in a CMOS inverter when input A = 1?
pMOS turns off, nMOS turns on, and output Y is pulled low to 0.
76
New cards
What does XNOR mean?
NOT XOR.
77
New cards
Why is XNOR useful?
It can be used for equality checking because it outputs 1 when two bits match.
78
New cards
For unsigned addition, when does overflow occur?
When there is a carry out beyond the available number of bits.
79
New cards
For two's complement addition, when does overflow occur?
When positive + positive gives a negative result, or negative + negative gives a positive result.
80
New cards
How else can signed overflow be detected?
Overflow occurs if the carry into the sign bit differs from the carry out of the sign bit.
81
New cards
What are cross-coupled inverters?
Two inverters connected in a loop so each inverter output feeds the other inverter input.
82
New cards
Why can cross-coupled inverters store one bit?
They have two stable states, corresponding to Q = 0 or Q = 1.
83
New cards
Why are cross-coupled inverters alone not enough for practical memory?
They do not provide an easy controlled way to set or reset the stored value.
84
New cards
What does bistable mean?
A circuit has two stable states and can remember it's state indefinitely.
85
New cards
What does metastable mean?
The circuit is temporarily in an unstable or undefined state rather than a clear 0 or 1.
86
New cards
Why is metastability a problem?
The final output and the time taken to settle can be unpredictable.
87
New cards
What is a finite state machine?
A model of a system with a finite number of states, inputs, outputs, and rules for moving between states.