CSC321 Homework Due Due Tuesday after spring break Turn in –Design information State diagram State table K-map simplifications and expressions for flip-flop.

Slides:



Advertisements
Similar presentations
Register Transfer and Microoperations Part2
Advertisements

Chapter 4 Register Transfer and Microoperations
Princess Sumaya Univ. Computer Engineering Dept. د. بســام كحـالــه Dr. Bassam Kahhaleh.
Chapter 7 Henry Hexmoor Registers and RTL
Princess Sumaya University
7-5 Microoperation An elementary operations performed on data stored in registers or in memory. Transfer Arithmetic Logic: perform bit manipulation on.
1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
8085 processor. Bus system in microprocessor.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
Chapter 7. Register Transfer and Computer Operations
Chapter 4 Operations on Bits
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #4 Register Transfer and Microoperations 23/2/2006 Chapter 4:
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Shift Micro operations
CSC321 Emulate a 4-Bit ALU in Java A0A0 A1A1 A2A2 A3A3 B0B0 B1B1 B2B2 B3B3 S0S0 S1S1 S2S2 S3S3 C in ILIL IRIR C out OV 4-Bit ALU S0S0 S1S1 S2S2 S3S3 Sum.
Computer System Configuration and Function Computer Architecture and Design Lecture 6.
MICRO OPERATIONS Department of Computer Engineering, M.S.P.V.L. Polytechnic College, Pavoorchatram.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
CSC321 Where We’ve Been Binary representations Boolean logic Logic gates – combinational circuits Flip-flops – sequential circuits Complex gates – modules.
Chapter 4 Register Transfer and Micro -operations
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
REGISTER TRANSFER AND MICROOPERATIONS
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
Computer System Architecture © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 4 Register Transfer and Microoperations 4-1 Chap. 4 Register Transfer.
EKT221 ELECTRONICS DIGITAL II CHAPTER 4: Computer Design Basics
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Chapter 4 Computer Design Basics. Chapter Overview Part 1 – Datapaths  Introduction  Datapath Example  Arithmetic Logic Unit (ALU)  Shifter  Datapath.
REGISTER TRANSFER LANGUAGE MICROOPERATIONS. TODAY OUTLINES Logic Microoperations Shift Microoperations.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
C++ Basics Tutorial 6 Operators. What are going to see today? Assignment operator(=) Arithmetic operators(+,-,*,/,%) Compound assignment(+=,-=,*=……..)
1 Chapter Four Register Transfer and Micro operations.
Micro Operation. MICROOPERATIONS Computer system microoperations are of four types: - Register transfer microoperations - Arithmetic microoperations -
Exam1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
EKT 221 : Chapter 4 Computer Design Basics
1 Chapter 7 Henry Hexmoor Registers and RTL. REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register Transfer Bus and Memory Transfers.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
Arithmetic Operations
Chapter 4 Register Transfer and Microoperations Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
Exam1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas.
Chapter 7 Bit Manipulation. 7.1 Logical Operations.
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
EKT 221 : Digital 2 Computer Design Basics Date : Lecture : 2 hrs.
Bit Manipulation in 'C' 'C' bit operators
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Register Transfer & Microoperations.
Microprocessor & Assembly Language
1 Register Transfer and Microoperations Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon’s slides.
1 REGISTER TRANSFER & MICROOPERATIONS. 2 OUTLINES Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Microoperations Logic.
REGISTER TRANSFER AND MICROOPERATIONS
Chapter 4 Operations on Bits.
REGISTER TRANSFER AND MICROOPERATIONS
Chapter 4 Register Transfer and Microoperations
Chap 7. Register Transfers and Datapaths
Overview Register Transfer Language Register Transfer
Register Transfer and Microoperations
REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT
به نام یگانه مهندس هستی معماری کامپیوتر مهدی قدیری
REGISTER TRANSFER LANGUAGE
Computer Organization and Design
Shift & Rotate Instructions)
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Shift & Rotate Instructions)
Overview Part 1 - Registers, Microoperations and Implementations
CHAPTER-3 REGISTER TRANSFER LANGUAGE AND MICROOPERATIONS
Instruction execution and ALU
Presentation transcript:

CSC321 Homework Due Due Tuesday after spring break Turn in –Design information State diagram State table K-map simplifications and expressions for flip-flop inputs Circuit diagrams for flip-flop input expressions –Code listing for your gray-code simulation class –Code listing for your test function –Output screen dump of the working simulation

CSC321 Logic Microoperations Counter-part to the arithmetic microoperations we looked at last week Similar to Boolean functions (expressions) except that the operands are registers (bit strings) rather than individual Boolean variables –This is exactly what you implemented in code

CSC321 Register Transfer Language We need some new symbols to avoid (or cause) confusion R1 R2 R Bitwise AND R1 R2 R Bitwise OR R2 R Bitwise NOT

CSC321 Context will always be a bitwise AND microop. will always be a bitwise OR microop. will always be a single bit AND will be a single bit OR in a Boolean function (never a bitwise OR microop.) will be an arithmetic ADD in an arithmetic function

CSC321 Context R1R2, R1P + Q: R4 R5 R3 What operation is this?

CSC321 Logical Microoperations Given two binary variables there are 16 different logical microoperations that can be performed –How can this be given that there are only 4 combinations of input values?

CSC321 Logical Microoperations InputsOutputs xyF0F0 F1F1 F2F2 F3F3 F4F4 F5F5 F6F6 F7F7 F8F8 F9F9 F 10 F 11 F 12 F 13 F 14 F

CSC321 Logical Microoperations Some of them are not intuitive (or useful) They can all be created using AND, OR, NOT, and XOR functions –You should be able to create the table of functions (page 110, Table 4-6) How would you go about doing this?

CSC321 Hardware Implementation We know how to implement Boolean functions using combination logic How do we implement them to perform bitwise microoperations?

CSC321 Hardware Implementation S0S0 S1S1 FiFi AiAi BiBi 4x1 MUX If you need n-bit microoperations (n-bit registers) you have n of these circuits …with a lot of logic gates!

CSC321 Hardware Implementation But doesn’t that MUX only implement 4 expressions? What about the other 12? We can use a bigger MUX or realize that many of the other 12 are useless and the ones that are useful can be derived from the 4 that we implemented, keeping hardware costs down

CSC321 But Why? What can be done with logic microoperations? –Most useful when we consider the bits of a given register as separate signals

CSC321 In Java if we need 8 boolean variables we generally do something like this… This may be very inefficient dependent on how the Java compiler generates the byte code Logic Microoperations boolean b7 = false; boolean b6 = false; … boolean b0 = false; OR boolean b[] = new boolean[8]; for (int i = 0; i < 8; ++i) { b[i] = false; }

CSC321 A more memory efficient way to represent the same information would be… This is referred to as “bit packing” But how do we get to the individual bits within the byte? Logic Microoperations byte b = 0;

CSC321 Logic Microoperations Through bitwise logic operations –Selective-set –Selective-complement –Selective-clear –Mask –Insert –Clear

CSC321 We want to set certain bits to 1 while leaving the others unchanged Any ideas? Selective-Set ?

CSC321 Selective-Complement We want to complement (invert) certain bits while leaving the others unchanged Any ideas? ?

CSC321 Selective-Clear We want to clear (0) certain bits while leaving the others unchanged Any ideas? ?

CSC321 Mask Similar to Selective-clear but the “selection” is done with 0’s rather than 1’s Any ideas? ?

CSC321 Insert Insert (replace) a group of bits into the existing bit string while leaving other bits unchanged Any ideas? ? 1101xxxx

CSC321 Clear Compare the two values and if they are equal, produce a string of 0’s Any ideas? ?

CSC321 Usage These types of operations are especially useful when designing hardware But, they are also heavily used in software –Device drivers (s/w that talks to h/w) –Embedded systems (small programmable h/w devices) –High speed applications such as games or other video applications

CSC321 Shift Microoperations Serial modification/transfer of bits similar to the shift registers we looked at previously Three basic types of shift –Logical shift –Circular shift (often called rotation) –Arithmetic shift

CSC321 Logical Shift Acts like a shift register with a 0 shifted in to the vacated bit position –Shifts can be to the left or the right –Bits that are shifted “off the end” are lost R1 ← shl R1 R1 ← shr R1

CSC321 Circular Shift Acts like a shift register with the end bit shifted in to the vacated bit position –Shifts can be to the left or the right –No information is lost R1 ← cil R1 R1 ← cir R1 R1 ← rotl R1 R1 ← rotr R1

CSC321 Arithmetic Shift Shifts are performed with special attention paid to the MSB (the sign bit – 2’s complement notation) –Left arithmetic shifts correspond to integer divide by powers of 2 Division must leave the sign bit unchanged Division cannot causes an overflow –Right arithmetic shifts correspond to integer multiply by powers of 2 Multiplication must leave the sign bit unchanged Multiplication must be overflow aware

CSC321 Arithmetic Shift Right Leaves the sign bit unchanged and shifts the number (including the sign bit) to the right Did it work as expected? R1 ← ashr R1

CSC321 Arithmetic Shift Left Inserts 0 into LSB (why?) If MSB changes after the shift an overflow has occurred (why?) Can predict overflow by comparing MSB (bit n-1) to next bit (bit n-2) Did it work as expected? R1 ← ashl R R1 ← ashl R1

CSC321 Arithmetic Shift Left What is the “overflow rule”? How can you implement it?

CSC321 Implementation The arithmetic, logic, and shift microoperations are generally implemented in a single “unit” – the ALU (Arithmetic- Logic Unit) The ALU is generally made up of combinational circuits (as opposed to sequential circuits) –Why should this be the case?

CSC321 ALU Block Diagram Stage i Arithmetic Circuit Stage i Logic Circuit Stage i 4x1 MUX S3S3 S2S2 S1S1 S0S0 shl C in C out BiBi AiAi A i-1 A i+1 shr FiFi select Combinational circuits that we looked at previously are inserted into the boxes

CSC321 Table of Microoperations Operation SelectResultant operation/function S3S3 S2S2 S1S1 S0S0 C in OperationFunction 00000F=ATransfer 00001F=A+1Increment 00010F=A+BAdd 00011F=A+B+1Add w/carry 00100F=A+B’Sub w/borrow 00101F=A+B’+1Subtract 00110F=A-1Decrement 00111F=ATransfer 0100xF=A BAND 0101xF=A BOR 0110xF=A BXOR 0111xF=A’Complement 10xxxF=shr AShift right 11xxxF= shl AShift left