CENG 103 Intro To CENG Lecture Notes SB - 2
CENG 103 Intro To CENG Lecture Notes SB - 2
0 0 1 1 0 0 1 1 1 1
0 1 1 0 0 1 1 0 1 0
1 0 0 1 0 1 1 0 1 0
1 1 0 0 1 1 0 0 0 0
Boolean Algebra - Examples
For the OR logic, the transistors are For the AND logic, the
in parallel and when one or both of transistors are in series and
the transistors are in the conducting both transistors must be in the
state, the output will be high. conducting state to drive the
output high.
Combinational circuits
Logic circuits whose outputs at any time depend on inputs supplied at
that time.
e.g. 2-to-4 decoder: e.g. 3-to-8 decoder:
D0 = A0’.A1’
…
D3 = A0.A1
Using smaller circuits to build larger ones:
e.g. Constructing a 3-to-8 decoder with two 2-to4 decoders:
Another common combinational circuit family:
Multiplexer (MUX): Only the input signal selected by the «select» signal is transferred to the output.
e.g. 4-to-1 MUX: e.g. 8-to-1 MUX:
Basic arithmetic circuits:
One bit (half) adder: One bit full adder:
Sum = A⊕ B, Carry = A.B
A B S C
0 0 0 0
0 1 1 0
1 0 1 0
One bit full adder,
1 1 0 1 an alternative realisation
Sequential circuits
The output of a sequential circuit depends on earlier inputs as well as
the current inputs. That is, the circuit «remembers» earlier inputs. That
is, sequential circuits store information Memory.
Outputt = F (Inputt , Statet)
Statet+1 = G (Inputt , Statet) (State Transition Function)
Simplest sequential circuit: One bit memory (R-S flip-flop):
When S=R=1, the state (Q) does not change,
regardless of whether it is 0 or 1.
Rather than controlling the FF with a «brief application» of the control signal, that is R or S,
state change in the gated D-Latch will ocur only when «Enable» = 1.
When «Enable» is momentarily set to 1, exactly one of the outputs S or R will be set to 0,
depending on the value of D. If D equals 1, then S is set to 0.
If D equals 0, then both inputs to the lower NAND gate are 1, resulting in R being set to 0.
As we saw earlier, if S is set to 0, the R-S latch is set to 1. If R is set to 0, the R-S latch is set to 0.
Thus, the R-S latch is set to 1 or 0 according to whether D is 1 or 0.
When «Enable» returns to 0, both S and R return to 1, and the value stored in the R-S latch persists.
Computer Memory
e.g.
Eight «words», each 4 bits long,
addressable with 3-bit addresses.
Page: 2
e.g. continued – (b) state table
b)
c)
A(t+1) = x′y + xA
B(t+1) = x′B + xA
z=B
Another example: A single RSFF
State: Q, Inputs: RS
Q R S Qt+1 Qt+1 = QR + Q’S’
0 0 0 1
0 0 1 0 R1 1S
0 1 0 0
0 1 1 1 0 R0 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
0S
NOTE: Each FF can be in one of 2 states, so with N flip flops, a machine with 2N states can be constructed.