CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS



Similar documents
Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Counters & Shift Registers Chapter 8 of R.P Jain

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Digital Logic Design Sequential circuits

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Module 3: Floyd, Digital Fundamental

Contents COUNTER. Unit III- Counters

Asynchronous counters, except for the first block, work independently from a system clock.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Asynchronous Counters. Asynchronous Counters

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

ECE380 Digital Logic

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Counters and Decoders

CpE358/CS381. Switching Theory and Logical Design. Class 10

Lecture-3 MEMORY: Development of Memory:

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

BINARY CODED DECIMAL: B.C.D.

Memory unit. 2 k words. n bits per word

Registers & Counters

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Counters are sequential circuits which "count" through a specific state sequence.

Systems I: Computer Organization and Architecture

DEPARTMENT OF INFORMATION TECHNLOGY

Chapter 8. Sequential Circuits for Registers and Counters

Design: a mod-8 Counter

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Upon completion of unit 1.1, students will be able to

Lesson 12 Sequential Circuits: Flip-Flops

Flip-Flops, Registers, Counters, and a Simple Processor

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Engr354: Digital Logic Circuits

Counters. Present State Next State A B A B

Digital Electronics Detailed Outline

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Decimal Number (base 10) Binary Number (base 2)

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Memory Elements. Combinational logic cannot remember

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Lab 1: Study of Gates & Flip-flops

Lecture 8: Synchronous Digital Systems

(Refer Slide Time: 00:01:16 min)

Cascaded Counters. Page 1 BYU

Theory of Logic Circuits. Laboratory manual. Exercise 3

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

(1) /30 (2) /30 (3) /40 TOTAL /100

Chapter 9 Latches, Flip-Flops, and Timers

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

6-BIT UNIVERSAL UP/DOWN COUNTER

Sequential Logic Design Principles.Latches and Flip-Flops

Operating Manual Ver.1.1

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

DM74LS191 Synchronous 4-Bit Up/Down Counter with Mode Control

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Layout of Multiple Cells

The components. E3: Digital electronics. Goals:

Standart TTL, Serie Art.Gruppe

RETRIEVING DATA FROM THE DDC112

ASYNCHRONOUS COUNTERS

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

DATA SHEETS DE COMPONENTES DA FAMÍLIA LÓGICA TTL GATES AND INVERTERS POSITIVES NAND GATES AND INVERTERS DESCRIÇÃO

CHAPTER 11 LATCHES AND FLIP-FLOPS

Modeling Registers and Counters

Systems I: Computer Organization and Architecture

CHAPTER 3 Boolean Algebra and Digital Logic

CPEN Digital Logic Design Binary Systems

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

Fig1-1 2-bit asynchronous counter

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

Computer organization

COMBINATIONAL CIRCUITS

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Chapter 5. Sequential Logic

Sequential Circuit Design

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Semiconduttori - C-MOS

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

Digital Design with VHDL

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

Copyright Peter R. Rony All rights reserved.

Philadelphia University Faculty of Information Technology Department of Computer Science Semester, 2007/2008.

Fundamentals of Digital Electronics

CSE140: Components and Design Techniques for Digital Systems

Transcription:

CHAPTER IX-1 CHAPTER IX CHAPTER IX COUNTERS, SHIFT, AN ROTATE REGISTERS REA PAGES 249-275 FROM MANO AN KIME

CHAPTER IX-2 INTROUCTION -INTROUCTION Like combinational building blocks, we can also develop some simple building blocks using registers. These include: Shift registers Rotate registers Counters Implementations of these components can use state machines, but, it is often easier to think of them without the complication of a state machine.

CHAPTER IX-3 SHIFT REGISTERS INTROUCTION -INTROUCTION Logical shift registers take the bits stored and move them up a significant bit or down a significant bit. LOGICAL SHIFT RIGHT (LSR) 0 MSB LSB C out Sign bit ARITHMETIC SHIFT RIGHT replication (ASR) C out LOGICAL SHIFT LEFT (LSL) ARITHMETIC SHIFT LEFT (ASL) C out C out 0 0 Notice that logical and arithmetic shift lefts are the same.

CHAPTER IX-4 SHIFT REGISTERS LSR SAMPLE SHIFT REGISTERS -INTROUCTION A simple implementation of a logical right shift register might look like the following. MSB LSB 0 Shift? CLK z n 1 z n 2 z n 3

CHAPTER IX-5 SHIFT REGISTERS ASR SAMPLE SHIFT REGISTERS -INTROUCTION -LSR SAMPLE An arithmetic right shift register might look like the following. MSB LSB Shift? CLK z n 1 z n 2 z n 3

CHAPTER IX-6 SHIFT REGISTERS 4-BIT BIIRECTIONAL SHIFT REGISTERS -INTROUCTION -LSR SAMPLE -ASR SAMPLE The following is a 4-bit bidirectional shift register with parallel load. x 3 x 2 x 1 x 0 x l x r 3 2 1 0 4x1 MUX 3 2 1 0 4x1 MUX 3 2 1 0 4x1 MUX 3 2 1 0 4x1 MUX c 0 c 1 CLK

CHAPTER IX-7 SHIFT REGISTERS CASCAING (1) SHIFT REGISTERS -LSR SAMPLE -ASR SAMPLE -4-BIT BIIRECTIONAL Cascading of shift registers can also be done if the discarded bit is used to shift into another shift register module. For instance, the 4-bit bidirectional shift register previously presented can be easily cascaded using the (right shift data input) and x r (left shift data input) x l c 0 c 1 x 3 x 2 x 1 x 0 4-bit bidirectional shift register x l x r

CHAPTER IX-8 SHIFT REGISTERS CASCAING (2) SHIFT REGISTERS -ASR SAMPLE -4-BIT BIIRECTIONAL -CASCAING For example, an 8-bit bidirectional shift register with parallel load can be formed as follows. x 7 x 6 x 5 x 4 x r x 3 x 2 x 1 x 0 x l c 0 c 1 c 0 c 1 x 3 x 2 x 1 x 0 4-bit bidirectional shift register x l x r c 0 c 1 x 3 x 2 x 1 x 0 4-bit bidirectional shift register x l x r z 7 z 6 z 5 z 4

CHAPTER IX-9 ROTATE REGISTERS INTROUCTION SHIFT REGISTERS -ASR SAMPLE -4-BIT BIIRECTIONAL -CASCAING A rotate register is the same as a logical shift register except that the discarded bit is fed back into the empty space from the shift. MSB LSB ROTATE RIGHT ROTATE RIGHT WITH CARRY C ROTATE LEFT ROTATE LEFT WITH CARRY C

CHAPTER IX-10 ROTATE REGISTERS USING SHIFT REGISTERS SHIFT REGISTERS ROTATE REGISTERS -INTROUCTION Rotate registers can actually be implemented using shift registers that have serial data inputs (such as the 4-bit bidirectional shift register discussed). For example, a 4-bit rotate register can be formed as follows. x 3 x 2 x 1 x 0 c 0 c 1 c 0 c 1 x 3 x 2 x 1 x 0 4-bit bidirectional shift register x l x r

CHAPTER IX-11 COUNTERS INTROUCTION SHIFT REGISTERS ROTATE REGISTERS -INTROUCTION -USING SHIFT REGISTERS A counter is a register that on each clock pulse counts up or down, usually in binary. Types of counters ripple counters synchronous counters binary counters BC counters Gray-code counters Ring counters (a 1 moves in a ring from one flip-flop to the next) up/down counters (ability to increment or decrement) counters with a parallel load (load in starting value with parallel input)

CHAPTER IX-12 COUNTERS MOULO-P COUNTERS SHIFT REGISTERS ROTATE REGISTERS COUNTERS -INTROUCTION A modulo-p counter is defined by the following equation. S( t + 1) = ( S() t + x) mod p The state diagram for the modulo-p counter is as follows. 1 1 1 1 S 0 0 S 1 1 S 2 2 S p 1 p 1 0 0 0 0

CHAPTER IX-13 COUNTERS RIPPLE AN SYNCHRONOUS ROTATE REGISTERS COUNTERS -INTROUCTION -MOULO-P COUNTERS An n-bit binary counter consists of n flip-flops and can count in binary from 0 through 2 n 1. This can be formed with a modulo-p counter where p =. Two main categories exist for counters: Ripple counters One flip-flop transition serves to trigger other flip-flops. The clock pulse is usually only sent to the first flip-flop. This requires a memory cell that can complement its value. The JK flip-flip would be one approach (we have not studied this!) Synchronous counters Change of state is determined from the present state. Clock pulse sent to all flip-flops. 2 n

CHAPTER IX-14 COUNTERS TOGGLE LL COUNTERS -INTROUCTION -MOULO-P COUNTERS -RIPPLE & SYNCHRONOUS A toggle cell will be useful for implementing counters. (Count Enable) Transparent Latch Transparent Latch OUT Present Next OUT Latch Value Latch Value Toggle cell X X 0 0? 0 0 1 0 0 OUT 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1

CHAPTER IX-15 COUNTERS RIPPLE COUNTER COUNTERS -MOULO-P COUNTERS -RIPPLE & SYNCHRONOUS -TOGGLE LL The toggle cell can be used as follows to form a ripple counter. (Count Enable) Toggle cell Toggle cell Toggle cell Toggle cell OUT OUT OUT OUT Notice that the previous toggle cell is connected to the clock input of the next cell. This causes the bits to ripple through the counter.

CHAPTER IX-16 COUNTERS SYNCHRONOUS COUNTER COUNTERS -RIPPLE & SYNCHRONOUS -TOGGLE LL -RIPPLE COUNTER Below is an example 4-bit synchronous counter using toggle cells. (Count Enable) Toggle cell Toggle cell Toggle cell Toggle cell OUT OUT OUT OUT Notice that clock is sent to all toggle cells. A simplified form is in Figure 5-11, pp. 269 of Mano & Kime.

CHAPTER IX-17 COUNTERS MORE ON MOULO-P COUNTERS -TOGGLE LL -RIPPLE COUNTER -SYNCHRONOUS COUNT. Notice that the counters developed so far can count from 0 to 2 n 1 for n toggle cells. Therefore, for module-p counting, the p is currently limited to. How about if we wish p to be a non-power of 2? Need to build what can be referred to as a divide by counter. Given the following counter block, a general modulo-p counter can be constructed by clearing the counter after the desired maximum value. 2 n 4-bit counter

CHAPTER IX-18 COUNTERS BC COUNTER (MOULO-10) COUNTERS -RIPPLE COUNTER -SYNCHRONOUS COUNT. -MORE ON MOULO-P To illustrate general modulo-p counters, consider the following implementation of a single digit decimal counter using BC. 4-bit binary counter TC Terminal Count Output Notice that the counter is cleared after a value of 9 (1001).

CHAPTER IX-19 COUNTERS TERMINAL COUNT (TC) COUNTERS -SYNCHRONOUS COUNT. -MORE ON MOULO-P -BC COUNTER The previous BC counter was built by deriving a terminal count (TC) output signal. A terminal count output signal for any counter can be useful, so, we will be included in general block diagram for a binary counter. TC 4-bit binary counter Notice TC output In this 4-bit binary counter example, TC=1 only when the output is 1111.

CHAPTER IX-20 COUNTERS CASCAING COUNTERS COUNTERS -MORE ON MOULO-P -BC COUNTER -TERMINAL COUNT With a terminal count output (TC), counters can be easily cascaded together to form larger counters. For instance, an 8-bit binary counter can be formed as follows. 4-bit binary counter TC 4-bit binary counter TC z 7 z 6 z 5 z 4