Outline Registers Counters 12142021 1 Registers Definition Array














- Slides: 14
• Outline – Registers – Counters 12/14/2021 1
Registers • Definition: – Array of flip-flops (and possibly added combinational gates) to store binary data – Each flip-flop stores one bit – Register with n flip-flop stores n bits – There are many types of registers, each providing a certain form of storing data – In many registers, a clock (or a combination of clock and data) controls the timing of register; i. e. clock says when to update the data stored at register – Registers are heavily used in computers 12/14/2021 2
Registers (continued) • A simple register: – – – 12/14/2021 What data to be stored: D 1, D 2, D 3 and D 4 Where to store data: Q 1, Q 2, Q 3 and Q 4 When to load data: Clock How to reset (clear) the register: Clear Symbol: 3
Registers (continued) – Disadvantage: • We may not want to update data on each clock, i. e. we want loading at some particular times and not all clock pulses – Solution 1: Clock gating • Clock is gated with an input called “load” that tells the circuit when we want to load data • If Load = 1, C input = Clock (updating happens on each positive edge of Clock) • If Load = 0, C input = 1 (no edge of Clock will be observed and therefore no updating) – Disadvantage: Clock skew 12/14/2021 4
Registers (continued) – Solution 2: Control loading via flip-flop inputs • Load input is applied in forming data lines • If Load = 1, input data reach the flip-flip inputs • If Load = 0, the present data at the output (Q) will be fed back and reloaded. , i. e. new input data is ignored • Clock skew is avoided 12/14/2021 5
Registers (continued) • Shift registers: – A simple shift register: • • Circuit Serial Input Serial Output Clock: connected to all flip-flops • Symbol: • Clock can be gated (similar to other registers) – Gating clock creates clock skew 12/14/2021 6
Registers (continued) • Serial transfer between shift registers: – Clock is gated – Registers with more bits can be formed similarly – Timing diagram 12/14/2021 7
Registers (continued) – Table for serial transfer: • Serial addition: – Using shift registers to perform addition – Suitable for cases where bits of numbers to be added are received via a serial line 12/14/2021 8
Registers (continued) • Shift register with parallel load: – Feature: shift register is load in parallel – Circuit – If Load = 1, register is loaded in parallel – If Shift = 1, register is shifted 12/14/2021 9
Registers (continued) – Table: – Symbol: 12/14/2021 10
Counters • Definition: – A register that goes through a prescribed sequence of states upon the application of input – There are many types of counters, each providing a certain form of counting – Two general types of counters: • Ripple counter: the control input of some flip-flops are not derived by the circuit clock • Synchronous counter: a synchronous sequential circuit, i. e. each flipflop receives the clock in its control input 12/14/2021 11
Counters (continued) • Ripple counter: – Circuit – Control inputs of three flip-flops are derived by the output of other flip-flops – J and K inputs of all flip-flops are connected to 1, as a result for each rising edge on the control input, the outputs change – Since two changes of output makes a pulse, the period of pulse is divided by two in the next flip-flop 12/14/2021 12
Counters (continued) – Table: 12/14/2021 13
Counters (continued) • Synchronous binary counter: – A sequential circuit: design is similar to other sequential circuits – Table 12/14/2021 14