Digital Logic Department of CNET Chapter6 Registers And

  • Slides: 21
Download presentation
Digital Logic Department of CNET Chapter-6 Registers And Counters

Digital Logic Department of CNET Chapter-6 Registers And Counters

Outline of Chapter -6 Ø Ø Ø Registers and Counters Registers Shift Registers Ripple

Outline of Chapter -6 Ø Ø Ø Registers and Counters Registers Shift Registers Ripple Counters Binary Counters Synchronous Counters Digital Circuits 2

6. 1 Registers n Clocked sequential circuits A group of flip-flops and combinational gates

6. 1 Registers n Clocked sequential circuits A group of flip-flops and combinational gates connected to form a feedback path. Flip-flops + Combinational gates (essential) (optional) Examples: Registers and Counters n n Register: n n A group of flip-flops, each one of which shares a common clock and is capable of storing one bit information. Counter: n A register that goes through a predetermined sequence of states. Digital Circuits 3

6. 1 Registers n A n-bit register n n flip-flops capable of storing n

6. 1 Registers n A n-bit register n n flip-flops capable of storing n bits of binary information 4 -bit register shows in the fig Constructed with four D-type flip -flops to form a four-bit data storage register. Fig. 6. 1 Four-bit register Digital Circuits 4

6. 2 Shift Registers n Shift register n n 1 1 A register capable

6. 2 Shift Registers n Shift register n n 1 1 A register capable of shifting its binary information held in each cell to its neighboring cell, in a selected direction, is called a Shift register. Simplest shift register 0 1 1 0 1 Fig. 6. 3 Four-bit shift register Digital Circuits 5

Serial Transfer vs Parallel Transfer n Serial transfer n n n Information is transferred

Serial Transfer vs Parallel Transfer n Serial transfer n n n Information is transferred one bit at a time shifts the bits out of the source register into the destination register Parallel transfer: n All the bits of the register are transferred at the same time Digital Circuits 6

n Example: Serial transfer from reg A to reg B Fig. 6. 4 Serial

n Example: Serial transfer from reg A to reg B Fig. 6. 4 Serial transfer from register A to register B Digital Circuits 7

n Example: Serial transfer from reg A to reg B Digital Circuits 8

n Example: Serial transfer from reg A to reg B Digital Circuits 8

n Serial addition using D flip-flops 1 0101 1010 0 0 1 1 0011

n Serial addition using D flip-flops 1 0101 1010 0 0 1 1 0011 ? 001 1 0 1 Fig. 6. 5 Serial adder Digital Circuits 9

n Serial adder using JK flip-flops JQ = x y KQ = x y

n Serial adder using JK flip-flops JQ = x y KQ = x y = (x + y) S =x y Q Digital Circuits 10

Ci Fig. 6. 6 Second form of serial adder Digital Circuits 11

Ci Fig. 6. 6 Second form of serial adder Digital Circuits 11

Types of Universal Shift Register n n n Unidirectional shift register Bidirectional shift register

Types of Universal Shift Register n n n Unidirectional shift register Bidirectional shift register Universal shift register: n has both direction shifts & parallel load/out capabilities Digital Circuits 12

Universal Shift Register n Capability of a universal shift register: 1. 2. 3. 4.

Universal Shift Register n Capability of a universal shift register: 1. 2. 3. 4. 5. 6. 7. A clear control to clear the register to 0. A clock input to synchronize the operations. A shift-right control to enable the shift right operation and the serial input and output lines associated with the shift right. A shift-left control to enable the shift left operation and the serial input and output lines associated with the shift left. A parallel-load control to enable a parallel transfer and the n parallel input lines associated with the parallel transfer. n parallel output lines. A control state that leaves the information in the register unchanged in the presence of the clock. Digital Circuits 13

n Example: 4 -bit universal shift register Fig. 6. 7 Four-bit universal shift register

n Example: 4 -bit universal shift register Fig. 6. 7 Four-bit universal shift register Digital Circuits 14

A 0 A 1 A 2 Fig. 6. 7 Four-bit universal shift register (continued)

A 0 A 1 A 2 Fig. 6. 7 Four-bit universal shift register (continued) Digital Circuits 15

6. 3 Counters n Counter Definition: A register that goes through a prescribed sequence

6. 3 Counters n Counter Definition: A register that goes through a prescribed sequence of states upon the application of input pulses. Description: Ø Ø Input pulses may be clock pulses or originate from some external source The sequence of states may follow the binary number sequence ( Binary counter) or any other sequence of states. A Counter that follows the binary number sequence is called a binary Counter. An n-bit binary counter consists of n flip-flops and can count in binary from 0 through 2^n-1. Digital Circuits 16

Types of Counters n Categories of counters 1. Ripple counters The flip-flop output transition

Types of Counters n Categories of counters 1. Ripple counters The flip-flop output transition serves as a source for triggering other flip-flops no common clock pulse (not synchronous) 2. Synchronous counters: The CLK inputs of all flip-flops receive a common clock Digital Circuits 17

Four bit binary ripple counter n Example: 4 -bit binary ripple counter n Binary

Four bit binary ripple counter n Example: 4 -bit binary ripple counter n Binary count sequence: 4 -bit Digital Circuits 18

 1 0 Fig. 6. 8 Four-bit binary ripple counter with T and D

1 0 Fig. 6. 8 Four-bit binary ripple counter with T and D flip flops Digital Circuits 19

6. 4 Synchronous Counters n Synchronous counter n A common clock triggers all flip-flops

6. 4 Synchronous Counters n Synchronous counter n A common clock triggers all flip-flops simultaneously. Design procedure : n n Apply the same procedure of synchronous sequential circuit. Synchronous counter is simpler than general synchronous sequential circuits. Digital Circuits 20

n 4 -bit binary counter C_en A 0 A 1 A 2 Fig. 6.

n 4 -bit binary counter C_en A 0 A 1 A 2 Fig. 6. 12 Four-bit synchronous binary counter Digital Circuits 21