Arithmetic Functions and Circuits
|
|
- Meryl Palmer
- 7 years ago
- Views:
Transcription
1 Introduction to Digital Logic Prof. Nizamettin ADIN Course Outline. Digital Computers, Number ystems, Arithmetic Operations, Decimal, Alphanumeric, and Gray Codes 2. Binary Logic, Gates, Boolean Algebra, tandard Forms 3. Circuit Optimization, Two-Level Optimization, Map Manipulation, Multi-Level Circuit Optimization 4. Additional Gates and Circuits, Other Gate Types, Exclusive-OR Operator and Gates, High-Impedance Outputs 5. Implementation Technology and Logic Design, Design Concepts and Automation, The Design pace, Design Procedure, The major design steps 6. Programmable Implementation Technologies: Read-Only Memories, Programmable Logic Arrays, Programmable Array Logic,Technology mapping to programmable logic devices 7. Combinational Functions and Circuits 8. Arithmetic Functions and Circuits 9. equential Circuits torage Elements and equential Circuit Analysis 0. equential Circuits, equential Circuit Design tate Diagrams, tate Tables. Counters, register cells, buses, & serial operations 2. equencing and Control, Datapath and Control, Algorithmic tate Machines (AM) 3. Memory Basics 2 Introduction to Digital Logic Lecture 8 Arithmetic Functions and Circuits Overview Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead adders Binary subtraction Binary adder-subtractors igned binary numbers igned binary addition and subtraction Overflow Binary multiplication Other arithmetic functions Design by contraction 3 4 Iterative Combinational Circuits Block Diagram of a D Iterative Array A n-b n- A B A 0 B 0 Arithmetic functions Operate on binary vectors Use the same subfunction in each bit position Can design functional block for subfunction and repeat to obtain functional block for overall function Cell - subfunction block Iterative array - an array of interconnected cells An iterative array can be in a single dimension (D) or multiple dimensions n- 2 n Cell n- n- 2 Cell n C n- C Cell 0 Example: n = 32 Number of inputs =? Truth table rows =? Equations with up to? input variables Equations with huge number of terms Design impractical! Iterative array takes advantage of the regularity to make design feasible C reserved.
2 Functional Blocks: Addition Functional Block: Half-Adder Binary addition used frequently Addition Development: Half-Adder (HA), a 2-input bit-wise addition functional block, Full-Adder (FA), a 3-input bit-wise addition functional block, Ripple Carry Adder, an iterative array to perform binary addition, and Carry-Look-Ahead Adder (CLA), a hierarchical structure to improve performance. A 2-input, -bit width binary adder that performs the following computations: C A half adder adds two bits to produce a two-bit sum The sum is expressed as a sum bit, and a carry bit, C The half adder can be specified as a truth table for and C C Logic implification: Half-Adder Five Implementations: Half-Adder The K-Map for, C is: This is a pretty trivial map! By inspection: = + = = ( + ) ( + ) and C = C = (( ) ) These equations lead to several implementations C We can derive following sets of equations for a half-adder: (a) = + (d) = ( + ) C C = C = ( + (b) = ( + ) ( + ) (e) C = C = ) = ( c) = ( C+ ) C = (a), (b), and (e) are OP, PO, and OR implementations for. In (c), the C function is used as a term in the AND-NOR implementation of, and in (d), the C function is used in a PO term for. 9 0 Implementations: Half-Adder Functional Block: Full-Adder The most common half adder implementation is (e) = C = A NAND only implementation is: = ( + ) C C = (( ) ) C C A full adder is similar to a half adder, but includes a carryin bit from lower stages. Like the half-adder, it computes a sum bit, and a carry bit, C. For a carry-in (Z) of 0, it is the same as the half-adder: For a carry- in (Z) of : Z C Z C reserved. 2
3 Logic Optimization: Full-Adder Equations: Full-Adder Full-Adder Truth Table: Full-Adder K-Map: Z C Z Z C From the K-Map, we get: = Z + Z + Z + Z C = + Z + Z The function is the three-bit OR function (Odd Function): = Z The Carry bit C is if both and are (the sum is 2), or if the sum is and a carry-in (Z) occurs. Thus C can be re-written as: C = + ( ) Z The term is carry generate. The term is carry propagate. 3 4 Implementation: Full Adder Binary Adders Full Adder chematic Here,, and Z, and C (from the previous pages) are A, B, C i and C o, respectively. Also, G = generate and P = propagate. Note: This is really a combination of a 3-bit odd function (for )) and Carry logic (for C o ): (G = Generate) OR (P =Propagate AND C i = Carry In) Co = G + P Ci C i+ G i A i B i i P i C i To add multiple operands, we bundle logical signals together into vectors and use functional blocks that operate on the vectors Example: 4-bit ripple carry adder: Adds input vectors A(3:0) and B(3:0) to get a sum vector (3:0) Note: carry out of cell i becomes carry in of cell i + Description ubscript Name Carry In 0 0 C i Augend 0 A i Addend 0 0 B i um 0 i Carry out 0 0 C i bit Ripple-Carry Binary Adder A four-bit Ripple Carry Adder made from four - bit Full Adders: B 3 A 3 B 2 A 2 B A B 0 A 0 Carry Propagation & Delay One problem with the addition of binary numbers is the length of time to propagate the ripple carry from the least significant bit to the most significant bit. The gate-level propagation path for a 4-bit ripple carry adder of the last example: A 3 B3 A 2 A A 0 B 2 B B 0 FA C 3 C 2 C FA FA FA C 0 C 3 C 2 C C0 C 4 C Note: The "long path" is from A 0 or B 0 though the circuit to reserved. 3
4 Carry Lookahead Given tage i from a Full Adder, we know that there will be a carry generated when A i = B i = "", whether or not there is a carry-in. Alternately, there will be A i B i a carry propagated if the G i half-sum is "" and a carry-in, C i occurs. These two signal conditions P i are called generate, denoted as G i, and propagate, denoted as P i respectively and are identified in the circuit: C i+ i C i Carry Lookahead (continued) In the ripple carry adder: Gi, Pi, and i are local to each cell of the adder Ci is also local each cell In the carry lookahead adder, in order to reduce the length of the carry chain, Ci is changed to a more global function spanning multiple cells Defining the equations for the Full Adder in term of the P i and G i : P i = Ai Bi Gi = Ai Bi i = Pi Ci Ci+ = Gi + Pi Ci 9 20 Carry Lookahead Development C i+ can be removed from the cells and used to derive a set of carry equations spanning multiple cells. Beginning at the cell 0 with carry in C 0 : C = G 0 + P 0 C 0 C 2 = G + P C = G + P (G 0 + P 0 C 0 ) = G + P G 0 + P P 0 C 0 C 3 = G 2 + P 2 C 2 = G 2 + P 2 (G + P G 0 + P P 0 C 0 ) = G 2 + P 2 G + P 2 P G 0 + P 2 P P 0 C 0 C 4 = G 3 + P 3 C 3 = G 3 + P 3 G 2 + P 3 P 2 G + P 3 P 2 P G 0 + P 3 P 2 P P 0 C 0 Group Carry Lookahead Logic Figure 5-6 in the text shows the implementation of these equations for four bits. This could be extended to more than four bits; in practice, due to limited gate fan-in, such extension is not feasible. Instead, the concept is extended another level by considering group generate (G 0-3 ) and group propagate (P 0-3 ) functions: G0 3 = G3 + P3 G2 + P3 P2 G + P3 P2 P P0 G0 P0 3 = P3 P2 P P0 Using these two equations: C4 = G0 3 + P0 3 C0 Thus, it is possible to have four 4-bit adders use one of the same carry lookahead circuit to speed up 6-bit addition 2 22 Unsigned ubtraction Algorithm: ubtract the subtrahend N from the minuend M If no end borrow occurs, then M N, and the result is a non-negative number and correct. If an end borrow occurs, the N > M and the difference M N + 2 n is subtracted from 2 n, and a minus sign is appended to the result. Examples: ( ) reserved. 4
5 Unsigned ubtraction (continued) The subtraction, 2 n N, is taking the 2 s complement of N To do both unsigned addition and unsigned A subtraction requires: Quite complex! Borrow Binary adder Goal: hared simpler logic for both addition and subtraction Complement Introduce complements as an approach 0 ubtract/add Quadruple 2-to- multiplexer Result B Binary subtractor elective 2's complementer Complements Two complements: Diminished Radix Complement of N (r ) s complement for radix r s complement for radix 2 Defined as (r n ) Ν Radix Complement r s complement for radix r 2 s complement in binary Defined as r n N ubtraction is done by adding the complement of the subtrahend If the result is negative, takes its 2 s complement Binary 's Complement For r = 2, N = 000 2, n = 8 (8 digits): (r n ) = = or 2 The 's complement of is then: ince the 2 n factor consists of all 's and since 0 = and = 0, the one's complement is obtained by complementing each individual bit (bitwise NOT). Binary 2's Complement For r = 2, N = 000 2, n = 8 (8 digits), we have: (r n ) = or The 2's complement of 000 is then: Note the result is the 's complement plus, a fact that can be used in designing hardware Alternate 2 s Complement Method ubtraction with 2 s Complement Given: an n-bit binary number, beginning at the least significant bit and proceeding upward: Copy all least significant 0 s Copy the first Complement all bits thereafter. 2 s Complement Example: Copy underlined bits: 00 and complement bits to the left: 0000 For n-digit, unsigned numbers M and N, find M N in base 2: Add the 2's complement of the subtrahend N to the minuend M: M + (2 n N) = M N + 2 n If M > N, the sum produces end carry r n which is discarded; from above, M N remains. If M < N, the sum does not produce an end carry and, from above, is equal to 2 n ( N M ), the 2's complement of ( N M ). To obtain the result (N M), take the 2's complement of the sum and place a to its left reserved. 5
6 Unsigned 2 s Complement ubtraction Example Unsigned 2 s Complement ubtraction Example 2 Find s comp The carry of indicates that no correction of the result is required. Find s comp The carry of 0 indicates that a correction of the result is required. Result = (000000) 2 s comp 3 32 ubtraction with Diminished Radix Complement Unsigned s Complement ubtraction - Example For n-digit, unsigned numbers M and N, find M N in base 2: Add the 's complement of the subtrahend N to the minuend M: M + (2 n N) = M N + 2 n If M > N, the result is excess by 2 n. The end carry 2 n when discarded removes 2 n, leaving a result short by. To fix this shortage, whenever and end carry occurs, add in the LB position. This is called the end-around carry. If M < N, the sum does not produce an end carry and, from above, is equal to 2 n ( N M ), the 's complement of ( N M ). To obtain the result (N M), take the 's complement of the sum and place a to its left. Find s comp The end-around carry occurs Unsigned s Complement ubtraction Example 2 Find s comp The carry of 0 indicates that a correction of the result is required. Result = (000000) s comp igned Integers Positive numbers and zero can be represented by unsigned n-digit, radix r numbers. We need a representation for negative numbers. To represent a sign (+ or ) we need exactly one more bit of information ( binary digit gives 2 = 2 elements which is exactly what is needed). ince computers use binary numbers, by convention, the most significant bit is interpreted as a sign bit: s a n 2 a 2 a a 0 where: s = 0 for Positive numbers s = for Negative numbers and a i = 0 or represent the magnitude in some form reserved. 6
7 igned Integer Representations igned Integer Representation Example igned-magnitude here the n digits are interpreted as a positive magnitude. igned-complement here the digits are interpreted as the rest of the complement of the number. There are two possibilities here: igned 's Complement Uses 's Complement Arithmetic igned 2's Complement Uses 2's Complement Arithmetic r =2, n=3 Number ign -Mag. 's Comp. 2's Comp igned-magnitude Arithmetic If the parity of the three signs is 0:. Add the magnitudes. 2. Check for overflow (a carry out of the MB) 3. The sign of the result is the same as the sign of the first operand. If the parity of the three signs is :. ubtract the second magnitude from the first. 2. If a borrow occurs: take the two s complement of result and make the result sign the complement of the sign of the first operand. 3. Overflow will never occur. ign-magnitude Arithmetic Examples Example : (+2) +0 0 (+5) 0 (7) (borrow) Example 2: (+2) + 0 +(-5) 0 => 2s comp => 0 (-3) Example 3: 0 0 (-2) 0 0 -(5) (-7) igned-complement Arithmetic igned 2 s Complement Examples Addition:. Add the numbers including the sign bits, discarding a carry out of the sign bits (2's Complement), or using an end-around carry ('s Complement). 2. If the sign bits were the same for both numbers and the sign of the result is different, an overflow has occurred. 3. The sign of the result is computed in step. ubtraction: Form the complement of the number you are subtracting and follow the rules for addition. Example : 0 (-3) +0 0 (+3) (0) Example 2: 0 (-3) 0 (-3) 0 0 -(+3) 0 (-3) 0 0 (-6) 0 0 (-6) 4 42 reserved. 7
8 igned s Complement Examples Example : 0 (-2) +0 0 (+3) Example 2: 0 (-2) => => (+3) 0 0 (-5) 2 s Complement Adder/ubtractor ubtraction can be done by addition of the 2's Complement.. Complement each bit ('s Complement.) 2. Add to the result. The circuit shown computes A + B and A B: For =, subtract, the 2 s complement B 3 A 3 B 2 A 2 B A B 0 A 0 of B is formed by using ORs to form the s comp and adding the applied to C 0. For = 0, add, B is C 3 FA FA FA FA passed through unchanged C 4 3 C 2 C C Overflow Detection Overflow occurs if n + bits are required to contain the result from an n-bit addition or subtraction Overflow can occur for: Addition of two operands with the same sign ubtraction of operands with different signs igned number overflow cases with correct result sign Detection can be performed by examining the result signs which should match the signs of the top operand Overflow Detection igned number cases with carries C n and C n shown for correct result signs: igned number cases with carries shown for erroneous result signs (indicating overflow): implest way to implement overflow V = C n + C n This works correctly only if s complement and the addition of the carry in of is used to implement the complementation! Otherwise fails for Binary Multiplication Review - Decimal Example: (237 49) 0 The binary digit multiplication table is trivial: (a b) b = 0 b = a = a = 0 This is simply the Boolean AND function. Form larger products the same way we form larger products in base 0. Partial products are: 237 9, 237 4, and 237 Note that the partial product summation for n digit, base numbers requires adding up to n digits (with carries) Note also n m digit multiply generates up to an m + n digit result reserved. 8
9 Binary Multiplication Algorithm We execute radix 2 multiplication by: Computing partial products, and Justifying and summing the partial products. (same as decimal) To compute partial products: Multiply the row of multiplicand digits by each multiplier digit, one at a time. With binary numbers, partial products are very simple! They are either: all zero (if the multiplier digit is zero), or the same as the multiplicand (if the multiplier digit is one). Note: No carries are added in partial product formation! Example: (0 x 0) Base 2 Partial products are: 0, 0, and 0 0 Note that the partial product summation for n digit, base 2 numbers requires adding up to n digits (with carries) in a column Note also n m digit multiply generates up to an m + n digit result (same as decimal) Multiplier Boolean Equations We can also make an n m block multiplier and use that to form partial products. Example: 2 2 The logic equations for each partial-product binary digit are shown below: We need to "add" the columns to get the product bits P0, P, P2, and P3. Note that some columns may generate carries. b b 0 a a 0 (a 0. b ) (a 0. b 0 ) + (a. b ) (a. b 0 ) P 3 P 2 P P 0 Multiplier Arrays Using Adders An implementation of the 2 2 A multiplier array is 0 shown: A B B 0 HA HA B B 0 C 3 C 2 C C Multiplier Using Wide Adders A more structured way to develop an n m multiplier is to sum partial products using adder trees The partial products are formed using an n m array of AND gates Partial products are summed using m adders of width n bits Example: 4-bit by 3-bit adder Following figure shows a 4 3 = 2 element array of AND gates and two 4-bit adders reserved. 9
10 Cellular Multiplier Array Another way to implement multipliers is to use an n m cellular array structure of uniform elements as shown: Each element computes a single bit product equal to a i b j, and implements a single bit full adder Column um from above Cell [ j, k ] pp [ j, k ] b[ k ] a[ j ] A B Co Ci FA Carry [ j, k ] Carry [ j, (k - )] Column um to below Other Arithmetic Functions Convenient to design the functional blocks by contraction - removal of redundancy from circuit to which input fixing has been applied Functions Incrementing Decrementing Multiplication by Constant Division by Constant Zero Fill and Extension Design by Contraction Contraction is a technique for simplifying the logic in a functional block to implement a different function The new function must be realizable from the original function by applying rudimentary functions to its inputs Contraction is treated here only for application of 0s and s (not for and ) After application of 0s and s, equations or the logic diagram are simplified by using rules given on pages of the text. Design by Contraction Example Contraction of a ripple carry adder to incrementer for n = 3 et B = 00 The middle cell can be repeated to make an incrementer with n > Incrementing & Decrementing Multiplication/Division by 2 n Incrementing Adding a fixed value to an arithmetic variable Fixed value is often, called counting (up) Examples: A +, B + 4 Functional block is called incrementer Decrementing ubtracting a fixed value from an arithmetic variable Fixed value is often, called counting (down) Examples: A, B 4 Functional block is called decrementer (a) Multiplication by 00 hift left by 2 C5 (b) Division by 00 hift right by 2 Remainder preserved B3 0 C3 C4 B2 0 C2 B3 B2 B B0 0 0 C3 C2 C C0 (a) B B0 C C0 C 2 C 2 2 (b) reserved. 0
11 Multiplication by a Constant Multiplication of B(3:0) by 0 ee text Figure 5-3 (a) for contraction B 3 Carry output C 6 B 2 B C 5 B 0 4-bit Adder C B 3 B 2 B B 0 um C 3 C 2 C C 0 Zero Fill Zero fill - filling an m-bit operand with 0s to become an n-bit operand with n > m Filling usually is applied to the MB end of the operand, but can also be done on the LB end Example: 00 filled to 6 bits MB end: LB end: Extension Extension - increase in the number of bits at the MB end of an operand by using a complement representation Copies the MB of the operand into the new positions Positive operand example extended to 6 bits: Negative operand example - 00 extended to 6 bits: reserved.
Binary Adders: Half Adders and Full Adders
Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order
More informationThe string of digits 101101 in the binary number system represents the quantity
Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for
More informationChapter 1: Digital Systems and Binary Numbers
Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching
More informationLet s put together a Manual Processor
Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce
More information5 Combinatorial Components. 5.0 Full adder. Full subtractor
5 Combatorial Components Use for data transformation, manipulation, terconnection, and for control: arithmetic operations - addition, subtraction, multiplication and division. logic operations - AND, OR,
More informationDigital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction
More informationLevent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC
Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n
More informationDEPARTMENT OF INFORMATION TECHNLOGY
DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453
More informationLecture 2. Binary and Hexadecimal Numbers
Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations
More informationSistemas Digitais I LESI - 2º ano
Sistemas Digitais I LESI - 2º ano Lesson 6 - Combinational Design Practices Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA - PLDs (1) - The
More informationexclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576
exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576 Outline exclusive OR gate (XOR) Definition Properties Examples of Applications Odd Function Parity Generation and Checking
More informationChapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language
Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,
More informationLecture 8: Binary Multiplication & Division
Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 3 1 2 s Complement Signed Numbers two = 0 ten 0001 two
More informationImplementation of Modified Booth Algorithm (Radix 4) and its Comparison with Booth Algorithm (Radix-2)
Advance in Electronic and Electric Engineering. ISSN 2231-1297, Volume 3, Number 6 (2013), pp. 683-690 Research India Publications http://www.ripublication.com/aeee.htm Implementation of Modified Booth
More informationCOMBINATIONAL CIRCUITS
COMBINATIONAL CIRCUITS http://www.tutorialspoint.com/computer_logical_organization/combinational_circuits.htm Copyright tutorialspoint.com Combinational circuit is a circuit in which we combine the different
More informationToday. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic
Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 9 - Register Transfer and Microoperations Microoperations Digital systems are modular in nature, with modules containing registers, decoders, arithmetic
More informationLogic Reference Guide
Logic eference Guide Advanced Micro evices INTOUCTION Throughout this data book and design guide we have assumed that you have a good working knowledge of logic. Unfortunately, there always comes a time
More informationAdder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits
Adder.T(//29) 5. Lecture 3 Adder ircuits Objectives Understand how to add both signed and unsigned numbers Appreciate how the delay of an adder circuit depends on the data values that are being added together
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x
More informationBinary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit
Decimal Division Remember 4th grade long division? 43 // quotient 12 521 // divisor dividend -480 41-36 5 // remainder Shift divisor left (multiply by 10) until MSB lines up with dividend s Repeat until
More informationComputer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
More informationOct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8
ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also
More informationCSE140 Homework #7 - Solution
CSE140 Spring2013 CSE140 Homework #7 - Solution You must SHOW ALL STEPS for obtaining the solution. Reporting the correct answer, without showing the work performed at each step will result in getting
More informationGates, Circuits, and Boolean Algebra
Gates, Circuits, and Boolean Algebra Computers and Electricity A gate is a device that performs a basic operation on electrical signals Gates are combined into circuits to perform more complicated tasks
More informationEE 261 Introduction to Logic Circuits. Module #2 Number Systems
EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook
More informationBOOLEAN ALGEBRA & LOGIC GATES
BOOLEAN ALGEBRA & LOGIC GATES Logic gates are electronic circuits that can be used to implement the most elementary logic expressions, also known as Boolean expressions. The logic gate is the most basic
More information(Refer Slide Time: 00:01:16 min)
Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control
More informationA single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc
Other architectures Example. Accumulator-based machines A single register, called the accumulator, stores the operand before the operation, and stores the result after the operation. Load x # into acc
More information2011, The McGraw-Hill Companies, Inc. Chapter 3
Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through
More informationTo convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:
Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents
More informationUnited States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1
United States Naval Academy Electrical and Computer Engineering Department EC262 Exam 29 September 2. Do a page check now. You should have pages (cover & questions). 2. Read all problems in their entirety.
More informationNumeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:
Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger
More informationFORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. The Binary Adder
FORDHAM UNIVERITY CIC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. cience pring, 2011 1 Introduction The Binar Adder The binar adder circuit is an important building
More informationBINARY CODED DECIMAL: B.C.D.
BINARY CODED DECIMAL: B.C.D. ANOTHER METHOD TO REPRESENT DECIMAL NUMBERS USEFUL BECAUSE MANY DIGITAL DEVICES PROCESS + DISPLAY NUMBERS IN TENS IN BCD EACH NUMBER IS DEFINED BY A BINARY CODE OF 4 BITS.
More information1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.
File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one
More informationSequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )
Sequential Logic (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential vs. Combinational Circuits Combinatorial circuits: their outputs are computed entirely from their present
More information3.Basic Gate Combinations
3.Basic Gate Combinations 3.1 TTL NAND Gate In logic circuits transistors play the role of switches. For those in the TTL gate the conducting state (on) occurs when the baseemmiter signal is high, and
More informationCSI 333 Lecture 1 Number Systems
CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...
More informationUseful Number Systems
Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2
More informationMultipliers. Introduction
Multipliers Introduction Multipliers play an important role in today s digital signal processing and various other applications. With advances in technology, many researchers have tried and are trying
More informationCounters are sequential circuits which "count" through a specific state sequence.
Counters Counters are sequential circuits which "count" through a specific state sequence. They can count up, count down, or count through other fixed sequences. Two distinct types are in common usage:
More informationEE360: Digital Design I Course Syllabus
: Course Syllabus Dr. Mohammad H. Awedh Fall 2008 Course Description This course introduces students to the basic concepts of digital systems, including analysis and design. Both combinational and sequential
More informationUnderstanding Logic Design
Understanding Logic Design ppendix of your Textbook does not have the needed background information. This document supplements it. When you write add DD R0, R1, R2, you imagine something like this: R1
More informationCHAPTER 3 Boolean Algebra and Digital Logic
CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4
More informationLecture 8: Synchronous Digital Systems
Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered
More informationDigital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture
More informationplc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationEXPERIMENT 4. Parallel Adders, Subtractors, and Complementors
EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors I. Introduction I.a. Objectives In this experiment, parallel adders, subtractors and complementors will be designed and investigated. In the
More informationPROBLEMS (Cap. 4 - Istruzioni macchina)
98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary
More informationSystems I: Computer Organization and Architecture
Systems I: omputer Organization and Architecture Lecture 8: Registers and ounters Registers A register is a group of flip-flops. Each flip-flop stores one bit of data; n flip-flops are required to store
More informationAn Efficient RNS to Binary Converter Using the Moduli Set {2n + 1, 2n, 2n 1}
An Efficient RNS to Binary Converter Using the oduli Set {n + 1, n, n 1} Kazeem Alagbe Gbolagade 1,, ember, IEEE and Sorin Dan Cotofana 1, Senior ember IEEE, 1. Computer Engineering Laboratory, Delft University
More informationCounters and Decoders
Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter
More informationCS201: Architecture and Assembly Language
CS201: Architecture and Assembly Language Lecture Three Brendan Burns CS201: Lecture Three p.1/27 Arithmetic for computers Previously we saw how we could represent unsigned numbers in binary and how binary
More informationC H A P T E R. Logic Circuits
C H A P T E R Logic Circuits Many important functions are naturally computed with straight-line programs, programs without loops or branches. Such computations are conveniently described with circuits,
More informationRN-coding of Numbers: New Insights and Some Applications
RN-coding of Numbers: New Insights and Some Applications Peter Kornerup Dept. of Mathematics and Computer Science SDU, Odense, Denmark & Jean-Michel Muller LIP/Arénaire (CRNS-ENS Lyon-INRIA-UCBL) Lyon,
More informationCombinational Logic Design
Chapter 4 Combinational Logic Design The foundations for the design of digital logic circuits were established in the preceding chapters. The elements of Boolean algebra (two-element switching algebra
More informationLecture 5: Gate Logic Logic Optimization
Lecture 5: Gate Logic Logic Optimization MAH, AEN EE271 Lecture 5 1 Overview Reading McCluskey, Logic Design Principles- or any text in boolean algebra Introduction We could design at the level of irsim
More informationKarnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012
Karnaugh Maps & Combinational Logic Design ECE 52A Winter 22 Reading Assignment Brown and Vranesic 4 Optimized Implementation of Logic Functions 4. Karnaugh Map 4.2 Strategy for Minimization 4.2. Terminology
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More information150127-Microprocessor & Assembly Language
Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an
More informationNEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.
CHAPTER 4 THE ADDER The adder is one of the most critical components of a processor, as it is used in the Arithmetic Logic Unit (ALU), in the floating-point unit and for address generation in case of cache
More informationFORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. Lab 2. The Full-Adder
FORDHAM UNIVERSITY CISC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. Science Spring, 2011 Lab 2 The Full-Adder 1 Introduction In this lab, the student will construct
More informationRN-Codings: New Insights and Some Applications
RN-Codings: New Insights and Some Applications Abstract During any composite computation there is a constant need for rounding intermediate results before they can participate in further processing. Recently
More informationFlip-Flops, Registers, Counters, and a Simple Processor
June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number
More informationECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path
ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path Project Summary This project involves the schematic and layout design of an 8-bit microprocessor data
More informationCS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions
CS101 Lecture 26: Low Level Programming John Magee 30 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? How can we control the computer s circuits? How
More informationDecimal Number (base 10) Binary Number (base 2)
LECTURE 5. BINARY COUNTER Before starting with counters there is some vital information that needs to be understood. The most important is the fact that since the outputs of a digital chip can only be
More informationChapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann
Chapter 7 Registers & Register Transfers J. J. Shann J.J. Shann Chapter Overview 7- Registers and Load Enable 7-2 Register Transfers 7-3 Register Transfer Operations 7-4 A Note for VHDL and Verilog Users
More informationZ80 Instruction Set. Z80 Assembly Language
75 Z80 Assembly Language The assembly language allows the user to write a program without concern for memory addresses or machine instruction formats. It uses symbolic addresses to identify memory locations
More informationLab 1: Full Adder 0.0
Lab 1: Full Adder 0.0 Introduction In this lab you will design a simple digital circuit called a full adder. You will then use logic gates to draw a schematic for the circuit. Finally, you will verify
More informationBinary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.
Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems
More informationFigure 8-1 Four Possible Results of Adding Two Bits
CHPTER EIGHT Combinational Logic pplications Thus far, our discussion has focused on the theoretical design issues of computer systems. We have not yet addressed any of the actual hardware you might find
More informationCHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS
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
More informationAn Effective Deterministic BIST Scheme for Shifter/Accumulator Pairs in Datapaths
An Effective Deterministic BIST Scheme for Shifter/Accumulator Pairs in Datapaths N. KRANITIS M. PSARAKIS D. GIZOPOULOS 2 A. PASCHALIS 3 Y. ZORIAN 4 Institute of Informatics & Telecommunications, NCSR
More informationTwo's Complement Adder/Subtractor Lab L03
Two's Complement Adder/Subtractor Lab L03 Introduction Computers are usually designed to perform indirect subtraction instead of direct subtraction. Adding -B to A is equivalent to subtracting B from A,
More informationLecture 4: Binary. CS442: Great Insights in Computer Science Michael L. Littman, Spring 2006. I-Before-E, Continued
Lecture 4: Binary CS442: Great Insights in Computer Science Michael L. Littman, Spring 26 I-Before-E, Continued There are two ideas from last time that I d like to flesh out a bit more. This time, let
More informationHOMEWORK # 2 SOLUTIO
HOMEWORK # 2 SOLUTIO Problem 1 (2 points) a. There are 313 characters in the Tamil language. If every character is to be encoded into a unique bit pattern, what is the minimum number of bits required to
More informationDivide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1
Divide: Paper & Pencil Computer Architecture ALU Design : Division and Floating Point 1001 Quotient Divisor 1000 1001010 Dividend 1000 10 101 1010 1000 10 (or Modulo result) See how big a number can be
More informationBase Conversion written by Cathy Saxton
Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,
More informationNUMBER SYSTEMS. William Stallings
NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html
More informationCPEN 214 - Digital Logic Design Binary Systems
CPEN 4 - Digital Logic Design Binary Systems C. Gerousis Digital Design 3 rd Ed., Mano Prentice Hall Digital vs. Analog An analog system has continuous range of values A mercury thermometer Vinyl records
More informationChapter 2 Logic Gates and Introduction to Computer Architecture
Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +
More informationThis Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers
This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition
More informationDigital Electronics Detailed Outline
Digital Electronics Detailed Outline Unit 1: Fundamentals of Analog and Digital Electronics (32 Total Days) Lesson 1.1: Foundations and the Board Game Counter (9 days) 1. Safety is an important concept
More informationBasic Logic Gates Richard E. Haskell
BASIC LOGIC GATES 1 E Basic Logic Gates Richard E. Haskell All digital systems are made from a few basic digital circuits that we call logic gates. These circuits perform the basic logic functions that
More informationTake-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas
Take-Home Exercise Assume you want the counter below to count mod-6 backward. That is, it would count 0-5-4-3-2-1-0, etc. Assume it is reset on startup, and design the wiring to make the counter count
More informationSIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands
SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands Ben Bruidegom, benb@science.uva.nl AMSTEL Instituut Universiteit van Amsterdam Kruislaan 404 NL-1098 SM Amsterdam
More informationStep : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary
RTL Design RTL Overview Gate-level design is now rare! design automation is necessary to manage the complexity of modern circuits only library designers use gates automated RTL synthesis is now almost
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a
More informationSAD computation based on online arithmetic for motion. estimation
SAD computation based on online arithmetic for motion estimation J. Olivares a, J. Hormigo b, J. Villalba b, I. Benavides a and E. L. Zapata b a Dept. of Electrics and Electronics, University of Córdoba,
More informationDigital Design. Assoc. Prof. Dr. Berna Örs Yalçın
Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 E-mail: siddika.ors@itu.edu.tr Grading 1st Midterm -
More informationMACHINE INSTRUCTIONS AND PROGRAMS
CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations
More informationDNA Data and Program Representation. Alexandre David 1.2.05 adavid@cs.aau.dk
DNA Data and Program Representation Alexandre David 1.2.05 adavid@cs.aau.dk Introduction Very important to understand how data is represented. operations limits precision Digital logic built on 2-valued
More informationMath Review. Numbers. Place Value. Rounding Whole Numbers. Place value thousands hundreds tens ones
Math Review Knowing basic math concepts and knowing when to apply them are essential skills. You should know how to add, subtract, multiply, divide, calculate percentages, and manipulate fractions. This
More informationETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies
ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation
More informationCHAPTER 7: The CPU and Memory
CHAPTER 7: The CPU and Memory The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides
More information