Professional Documents
Culture Documents
Digital computers are able to use logical functions to perform arithmetic operations. The basis of this is ADDITION How do we add two Binary Numbers? Addition of two binary bits Since there are only 1s and 0s, there are only four possible combination of inputs. 0+0 = 0 0+1= 1 1+0 = 1 1+1 =10
1 + 1 = 10 indicates that we must account for two output bits: the sum and possible carry.
FULL ADDER
A full adder is a logical circuit that performs an addition operation on three binary digits. The full adder produces a sum and carry value, which are both binary digits
INPUTS A B C 0 0 0 0 1 0 0 1 1 0
IN
OUTPUTS C S
OUT
0 1 0 1 0
0 0 0 1 0
0 1 1 0 1
1 1 1
0 1 1
1 0 1
1 1 1
0 0 1
Question to try
I1
Two half adders are connected as shown to form a full adder. Draw a table to show the outputs at points P, Q, R and S for the following states A) I =1, I = 0, I =1
1 2 3
B) I =1, I = 1, I =1
1 2 3
Memory relies on the concept called feedback. That is, the output of a gate is fed back into the input. The simplest possible feedback circuit using two inverters is shown below:
If A is connected to the 6 V supply-X goes high, Y and Z goes low and W goes high (i.e. the lamp L1 is off and L2 lights)
If A is now disconnected, L1 remains off and L2 remains on. The state is stable. The only way that the state can be changed is by making input B high. If Input B is high-Z is now high, W and X low and Y high. L2 is off and L1 is on.
Light will show which team first presses the buzzer-but the other teams light should not come on.
If Oxford presses first, its switch disconnects W from the 6V line, making it low-Both inputs to N1 are low and the Oxford lamp lights. Check to see that if Cambridge presses the buzzer after their lamp will NOT light.
Another useful feedback circuit using two NAND gates is shown above. The inputs R and S are called Reset and Set respectively and the outputs Q and Q are complements of each other (i.e. If Q =0, then Q=1)
SR flip Flop
An SR Flip Flop is an arrangements of logic gates that maintains a stable output even after the inputs are turned off. This simple flip flop circuit has a set input (S) and a reset input (R). The set input causes the output of 0 (top output) and 1 (bottom output). The reset input causes the opposite to happen (top = 1, bottom =0).
Flip Flops
Once the outputs are established, the wiring of the circuit is maintained until S or R go high, or power is turned of to the circuit. This is a simple model of how a bit of RAM can be perpetuated
S=1
R=1
-The flip flops that uses S (set) and R (reset) are simply called SR flip-flop or SR latch. -It is sometimes called a latch due to its ability to latch onto data. -The flip flop can be made from two NAND gates or two NOR gates. -Flip flop circuits will only remember stuff while power remains in the circuit.
-What happens if S=0 and R remains 1? Q becomes 1 and Q=0 -What happens if S is returned to 1 while R remains at 1? Q remains in its new stable position 1 and Q=0 -Return to S=1 and R=1 (stable condition) If R = 0 while S =1? Q=0 and Q=1 When R is returned to 1 while S=1 Q=0 and Q=1
One problem with the basic RS NOR latch is that the input signals actively drive their respective outputs to a logic 0, rather than to a logic 1. Thus, the S input signal is applied to the gate that produces the Q' output, while the R input signal is applied to the gate that produces the Q output.
S 0 1 0 1 R 0 0 1 1 Q STA 1 0 AVO Q BLE 0 1 ID
Triggered Bistable
Flip-flops can be either simple (transparent) or clocked. The operation of a binary counter depends on the triggered bistable. The state can be triggered by connecting either inputs to the power source or by a series of pulses which are fed to the trigger.
The module then directs each of these pulses in turn to each of the inputs so that the state of the bistable can be switched. Some flip-flops change output on the rising edge of the clock, others on the falling edge.
Diagram shows how three such triggered bistable modules may be used to count up to 7. It triggers on the trailing edge of the pulse.
Initially the bistable is set so that each of the outputs Q1, Q2 and Q3 are low. Q1, Q2 and Q3 will all be high. Then the pulses are applied.
On the trailing edge of the first pulse, X X1, the first module will trigger and Q1 becomes high. However the second module does not trigger since there is now the leading edge of a pulseY1Y1 going to the trigger. So after one pulse L1 is on, L2 is off and L3 is off. This corresponds to binary state 001
1
After the second pulse the first module triggers again on the trailing edge X2X2 Now Q1 drops back to a low state but the second module is triggered by the trailing edge, Y2Y2 of the pulse from Q1 and Q2 therefore goes high. The binary state after 2 pulses is 010
The results are tabulated below. Check to ensure that you get the results shown below.
No. of Pulses L1 Units L2 Twos L3 Fours Binary State
0 1 2 3
OFF ON OFF ON
OFF OFF ON ON
4
5 6 7
OFF
ON OFF ON
OFF
OFF ON ON
ON
ON ON ON
100
101 110 111
In addition, since many types of electronic equipment are inherently analog devices (e.g., stereo amplifiers, radio and television receivers), there are many occasions when it is necessary to transform digital information to analog information. This is accomplished by using a device know as a digital-to-analog converter (DAC or D/A converter).
VOUT
V1 V2 Rf ( ) R1 R2
A particular use of this circuit is to make a digital to analogue converter. This is a system that takes a binary number, consisting of an array of 1s and 0s and turn it into a p.d proportional to the actual number.
The circuit above can handle a 2-bit binary number. Suppose we feed the binary digit p.ds (which are either on or off) as follows: 1s digit to R1
2s digit to R2
Thus we want V2, if on, to give twice as much contribution to Vout as V1
For example, R1=8k, R2 = 4k Now whatever 2 digit binary combination comes into R1 and R2, the value of Vout will be proportional to the binary number being signalled.
2007 CAPE P2 Q7
Figure shows three T-type flip flops (bistables) connected together. Their output changes when the input detects a downward pulse i.e. the input changes from logic 1 to logic 0
Copy and complete the truth table to show the ouputs at X, Y and Z for four successive input pulses starting with all the outputs at zero.
Pulse No. 0 1 X Y Z
0 1
(b) Outputs X, Y and Z of the diagram on the previous page are connected to the inputs of the circuit below. Each of the inputs has a potential of 5V if it recieves a 1 and 0V if it receives 0V
1. Write an equation relating Vout to the three input voltages Vx, Vy and Vz 2. Calculate the value of Vout for the following binary inputs (in reverse order Z,Y,X) (i) 001(i.e. Z=0, Y=0 and X=1) (ii) 101 (iii) 110 3. Briefly describe how the circuit can act as a digital to analogue converter
Assume : R1=RF and R2=R If A2=1 A1=1 A0=1 Determine the value of V2