Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Systems Section 14 Registers. Digital Systems Section 14 Registers.

Similar presentations


Presentation on theme: "Digital Systems Section 14 Registers. Digital Systems Section 14 Registers."— Presentation transcript:

1

2 Digital Systems Section 14 Registers

3 Registers A flip-flop stores one bit of information.
When a set of n flip-flops is used to store n bits of information, we refer to these flip-flops as a register. A common clock is used for each flip-flop in a register, so that all actions are synchronous with clock edge. Some common examples of registers are: Shift register Parallel register Parallel-access shift register

4 Lecture Digital Systems Shift Registers Shift registers allow data to be transported from one flip-flop to the next, one bit at a time. The figure below shows a four-bit shift register that is used to shift its contents one bit position to the right, every time the clock is active. Bits travel on clock edges. Data input come in and come out in series.

5 Serial Data Transfer Using Shift Registers
Shift registers can be connected one to another, to create longer data register. Data loop back for shift register A Time Register A Register B T0 1011 0011 T1 1101 1001 T2 1110 1100 T3 0111 0110 T4

6 Serial Data Transfer Using Shift Registers

7 Parallel Register In computer system, it is often necessary to transfer n-bit data items. This may be done by transmitting all bits at once using n separate wires, in which case we say that the transfer is performed in parallel. Q3 Q2 Q1 Q0 Clock Parallel input Parallel output D Q

8 Parallel-access Shift Register
The next figure shows a four-bit shift register that allows the parallel access. The D input of each flip-flop is connected to two different sources. One source is the preceding flip-flop (for serial transfer). The other source is the external input (for parallel transfer). The control signal Shift/Load is used to select the mode of operation. Shift/Load = 0, serial transfer as shift register Shift/Load = 1, parallel transfer as parallel register.

9 Binary Numbers: Multiplication and Division
Digital Systems Section 15 Binary Numbers: Multiplication and Division

10 Binary Multiplication
The multiplication of binary numbers is done in the same manner as the multiplication of decimal numbers. The process becomes simpler because the multiplier digits are either 0 or 1 only. If the multiplier is 1, this means getting the multiplicand as the partial product with respective bit shifting to the left (remember shift register). If the multiplier is 0, this means getting 0 as the partial product, with respective bit shifting. multiplicand multiplier product 1110 1101 4 bits 1110 0000 partial products 1110 Multiplicand, shifted 2 and 3 positions to the left 1110 8 bits

11 Binary Multiplication
Adding all partial products at the same leads to a relatively slow circuit. This is primarily because a single 8-bit adder is used to perform all additions needed to generate the partial products and the final product. A much faster circuit can be obtained if multiple adders are used to compute the partial products. 1110 1101 0000 00111 10001 Note that as the computation progresses, the least-significant bits are not affected by subsequent additions; hence they can be passed directly to the final product (indicated by blue arrows).

12 Binary Multiplication
If any of the multiplicand or multiplier are negative, the negative should be first converted to a positive number. Multiplication process will be done in using positive multiplicand and positive multiplier. If the product should be positive, no conversion more needed. If the product should be negative, the product is converted to its negative form. multiplicand multiplier product Multiplicand Multiplier Product Steps positive calculate product negative convert multiplier, calculate product, convert product convert multiplicand, calculate product, convert product convert multiplicand and multiplier, calculate product

13 Exercise: Binary Multiplication
Lecture Digital Systems Exercise: Binary Multiplication Perform the multiplication of 40×25 in binary. Check the result. 101000 11001 101000 =

14 Exercise: Binary Multiplication
Lecture Digital Systems Exercise: Binary Multiplication Multiply the following pairs of binary numbers, and check your results by doing the multiplication in decimal. (i) 1011×1011 (ii) × (1110 × 1110 = 12110) ( × = ) A

15 Binary Division dividend remainder divisor quotient
The division of binary numbers is done in the same manner as the division of decimal numbers. The process becomes simpler because the quotient (division result) of a dividend by a divisor is either 0 or 1, plus remainder. The divisor is compared to the current dividend. If the divisor is greater that the current dividend, put 0 in the quotient and add a new digit to the dividend. If the divisor is less than the current dividend, put 1 in the quotient, subtract the dividend by the divisor, add a new digit to get new dividend. dividend remainder divisor quotient

16 Binary Division divisor 1 1 1 1 1 quotient 1000 1011 dividend 1000 1011 1010 partial remainder 111 1110 1010 1010 1011 1010 1101 1000 11110 1111 10 remainder 1011 100 All subtractions are to be done by adding the complements of the numbers.

17 Exercise: Binary Division
Lecture Digital Systems Exercise: Binary Division Divide by 10 A

18 Binary Division If any of the divisor or dividend are negative, the negative should be first converted to a positive number. Division process will be done in using positive divisor and positive dividend. The sign of the quotient and the remainder should be adjusted in the end, according to the equation: dividend = quotient × divisor + remainder. Dividend Divisor Quotient Remainder positive negative As example in decimal: 17 ÷ 3 = 5 remain 2 17 ÷ -3 = -5 remain 2 -17 ÷ 3 = -5 remain -2 -17 ÷ -3 = 5 remain -2 The dividend and the remainder have the same sign. If the dividend and the divisor have different sign, then the quotient will be negative.

19 Exercise: Binary Division
Lecture Digital Systems Exercise: Binary Division Perform the following divisions. Check your results by doing the division in decimal. (i) 1100 ÷ 100 (ii) ÷ 1.1 11 (1210 ÷ 410 = 310) ( ÷ = ) A

20 Digital Systems Section 16 Multiplexers

21 Lecture Digital Systems Multiplexer (Mux) A multiplexer (mux) is a digital circuit building block which is used to select and transmit one of its 2n inputs to its one output, based on n select bit. A multiplexer allows for conditional data transfer. A 4-input mux needs 2 select bit to indicate which input to route through. An 8-input mux needs 3 select bits, and so on. A railway switch

22 Lecture Digital Systems Multiplexer (Mux) Four data are possible to be displayed: Air temperature (T), average km/l (A), instantaneous km/l (I), and kilometer remaining (M), each 8-bit wide. We can chose which to display by using two inputs X and Y. In this case, an 8-bit 4-to-1 multiplexer is used.

23 Lecture Digital Systems 2-to-1 Multiplexer A multiplexer with one select bit is shown below, or 2-to-1 multiplexer. If S = 0, then Y = I0, if S = 1, then Y = I1. Circuit of 2-to-1 multiplexer Symbol

24 ? A 2-to-1 Multiplexer Truth table Compact truth table 1 S I0 I1
Lecture Digital Systems 2-to-1 Multiplexer Truth table Compact truth table 1 S I0 I1 F(S,I0,I1) 1 I0 I1 S F(S,I0,I1) Determine the Boolean expression for Y as a function of I0, I1, and S. ? Y = S’I0 + SI1 A

25 ? 4-to-1 Multiplexers A 4-to-1 multiplexer is shown below. D0 D1 D2 D3
Lecture Digital Systems 4-to-1 Multiplexers A 4-to-1 multiplexer is shown below. D0 D1 D2 D3 S1 S0 Y Mux 4-to-1 Determine the Boolean expression for Y as a function of Di and Si. ?

26 Lecture Digital Systems 4-to-1 Multiplexers A 4-to-1 multiplexer can also be made by using two 2-to-1 multiplexers, as shown below: I0 I1 1 I2 I3 F S0 S1

27 Quadruple 2-to-1 Multiplexer
Lecture Digital Systems Quadruple 2-to-1 Multiplexer A quadruple 2-to-1 multiplexer is shown below.

28 Design Exercise: Multiplexer
Lecture Digital Systems Design Exercise: Multiplexer Design a multiplexer with 8 inputs (A1, A2, B1, B2, C1, C2, D1, D2), with 2 outputs and 4 possibilities of transmission: (A1, A2), (B1, B2), (C1, C2), and (D1, D2). Give the logic expression and the logic circuit of the multiplexer. A2 B2 O2 O1 C2 D2 A1 B1 C1 D1 Select? ...

29 Exercise: Crossbar Switch
Lecture Digital Systems Exercise: Crossbar Switch Find out the truth table of the following circuit? What can the function of this circuit? X1 1 X2 S Y1 Y2 X1 X2 S Y1 Y2 1 (Straight) (Crossed) X1 X2 S Y1 Y2 This crossbar switch circuit is capable to connect any input to any output. Here X1 and X2 can be set to pass through Y1 or Y2.

30 Implementing Logic Function Using Multiplexer
Multiplexer can be directly used to implement a logic function. The easiest way is to use the input variables as the select signals. Inputs to the corresponding minterms are set to 1 (or, maxterms to 0, respectively). A 3-variable function F(A,B,C) = Σm(2,4,7) can be implemented using an 8-to-1 multiplexer as: D0 D1 D2 D3 S1 S0 F Mux 8-to-1 D4 D5 D6 D7 S2 A B C F 1 B C F Mux 8-to-1 A 1

31 Implementing Logic Function Using Multiplexer
F(A,B,C) = Σm(2,4,7) can also be implemented by using a 4-to-1 multiplexer. 2 variables (A,B) are assigned as select signals for the multiplexer, while 1 variable (C) acts as input to the multiplexer. Logic connection between C and F is to be determined. Additional logic gates may be required in the connection between the variable to the multiplexer inputs. D0 D1 D2 D3 S1 S0 F Mux 4-to-1 A B C F D D0, F = 0 1 D1, F = C’ D2, F = C’ D3, F = C A B F Mux 4-to-1 C

32 Lecture Digital Systems Homework 11 I1 I2 I3 I4 I5 I6 F Output I7 1 Three 2-to-1 multiplexers are connected as follows. The inputs I1, ..., I7 may be assigned to Xi or connected to logic signal (0 or 1). Show that this circuit can be used to make the following Boolean expression: (i) F = X1X2 + X3 (ii) F = X1X3 + X2X3 D0 D1 D2 D3 S1 S0 F Mux 4-to-1 Realize F(A,B,C,D) = Σm(1,5,6,8,9,11) by using a 4-to-1 multiplexer. Please write your Class number after your Student ID. Deadline: 1 day before class. Monday, 4 December 2017 (Class 2). Tuesday, 5 December 2017 (Class 1).


Download ppt "Digital Systems Section 14 Registers. Digital Systems Section 14 Registers."

Similar presentations


Ads by Google