Number representation
|
|
- Willis Atkinson
- 5 years ago
- Views:
Transcription
1 Number representation A number can be represented in binary in many ways. The most common number types to be represented are: Integers, positive integers one-complement, two-complement, sign-magnitude Decimal real numbers with a fixed range fixed-point Decimal real numbers floating-point
2 Integers Positive integers: = = 109 But how to represent negative numbers???
3 Sign-magnitude Integer: S = - ( ) = - 45 The magnitude of the number Sign-bit Drawback: two representations of zero (+/-) 0
4 1-complement The negative numbers are the complement of the positive numbers. Bit for bit in the positive number is inverted to get the corresponding negative. B=b N-1 b N-2...b 1 b 0 där b i {0,1} b N-1 b N-2... b 1 b 0 Sign Bit Drawbacks: Two zeroes (+/-) 0. At some additions adjusting is required.
5 2-complement Representation with 2-complement B=b N-1 b N-2...b 1 b 0 där b i {0,1} b N-1 b N-2... b 1 b 0 Sign Bit Decimalvalue: D(B)= - b N-1 2 N-1 +b N-2 2 N b b This is the most common representation of signed integers.
6 2-complement Conversion example: B=b N-1 b N-2...b 1 b 0 där b i {0,1} Sign Bit Decimalvalue: D(B)= - b N-1 2 N-1 +b N-2 2 N b b = = -1 It s alwais the biggest number that corresponds to -1.
7 Number conversion positive number to negative The Twocomplement methood invert add one
8 Number conversion negative number to positive Twocomplement methood invert add one The same procedure in both directions!
9 2-complement 000 Computer registers are "rings". The figure shows a three-bit register. When you count with signed numbers the negative numbers, are the left half of the ring
10 2-complement fast conversion In order to easily produce 2's complement of a binary number, you can use the following procedure: Start fron the right side Copy all bits from the binary number that is 0 and the first bit that is 1. Invert Invert the rest of the bits. Copy Exemple: 2-complement from 110 is 010
11 Sign-extension In calculations the computers often need to increase the number of digits (bits) before any calculation - how do you do it with negative numbers? Integer: = = - 45 Sign bit has a negative weight -2 n-1 2 n If you want to extend the number of digits you need to copy the sign bit to all extended bits!
12 Addition (BV: page 264) (+5) + (+2) (+7)
13 Addition (BV: page 264) ignore (+5) + (-2) (+3) Carry-bit could be ignored!
14 Addition (BV: page 264) ignore (-5) + (-2) (-7) Carry-bit could be ignored!
15 Overflow Overflow the sign bit is not consistent with the input numbers (+5) + (+5) (-6)
16 Overflow 2 ignore Overflow the sign bit is not consistent with the input numbers (-5) + (-5) (+6) Carry-bit could be ignored!
17 Subtraction (BV: page 265) Borrow one (+5) - (+2) (+3) ???? How do you do the subtraction in an easy way?
18 Subtraction (BV: page 265) ignore (+5) - (+2) (+3)???? Making an addition of 2's complement instead! Carry-bit could be ignored!
19 Subtraction (BV: page 265) ignore (-5) - (+2) (-7)???? Carry-bit could be ignored!
20 Subtraction (BV: page 265) (+5) - (-2) (+7) ????
21 Subtraction (BV: page 265) (-5) - (-2) (-3) ????
22 2-complement summary Range: -2 N-1 up to 2 N-1-1 Negation: Invert every bit (the boolean complement), and add 1. Expansion of bit-length: Extend with bits at the left of the number with the same value as the sign bit. Overflow-rule: If two numbers with the same sign are added, it has become overflow if the result has the opposite sign. Subtraction rule: To subtract B from A, take the two complement of B and add to A.
23 Alternative way to detect overflow (BV: page 271) c 4 =0 c 3 =1 (+7) + (+2) (-7) Overflow because c 4 and c 3 are different!
24 Alternative way to detect overflow (BV: page 271) c 4 =0 c 3 =0 (-7) + (+2) (-5) Not Overflow because c 4 and c 3 are the same!
25 Alternative way to detect overflow (BV: page 271) ignore (+7) + (-2) (+5) c 4 =1 c 3 = Not Overflow because c 4 and c 3 are the same! Carry-bit could be ignored!
26 Alternative way to detect overflow (BV: page 271) ignore (-7) + (-2) (+7) c 4 =1 c 3 = Overflow because c 4 and c 3 are different! Carry-bit could be ignored!
27 Logic to detect overflow XOR For 4-bit-number Overflow if c 3 och c 4 are different Otherwise, it is not overflow Overflow = c 3 c 4 + c 3 c 4 = c 3 c 4 For n-bit-number Overflow = c n 1 c n
28 Quickie Question The number +5 is represented by 0101 if we use 4 bits. What number is equivalent to -5 if we use 8-bit two's complement representation? a: b: c:
29 Hardware for arithmetic
30 Half adder a b HA s c a b c s a b a b c = a b s = a b a b s c
31 Full adder a b c in FA s c ut a b c in c ut s a b c in s c ut c in c in 0 1 ab s = a b c in c ut = a b + c in a + c in b
32 The sum function? c in s = a b c in
33 c ab Sum = Odd parity The Full Adder sum function is the "odd" parity function. This is the XOR function s natural extension to more variables than two. Odd parity is when the number of 1 s on the inputs is an odd number. Odd parity b 0 1 a XOR Odd parity a b a b c Odd parity
34 Carry function? Majority function. Output assumes same value 1/0 as a majority of the inputs. M
35 Full-adder with two ½ -adders We may also construct a full-adder with two half-adders and an OR gate. a b c in FA s c ut a b c in HA HA s cut Decomposition means that you see the circuit as composed of building blocks. Such known building blocks could be used to build build entirely new systems, Composition.
36 a b c in c ut s Full-adder ½+ ½ = 1 c in a b c in a b HA (a b) can be shared for both s and c ut! HA s cut s c ut c in c in ab a b (a b) c in c ut = (a b) c in + a b ab s = a b c in
37 Popular tattoo? Tattoos are forever! Unfortunately this is not the "best" adder, not if you want fast computers. Exciting continuation of adder circuits follow...
38 ( Parityfunction Three-way light control) c in Odd parity. s = a b c in
39 Three-way light control - revisited Brown/Vranesic: Suppose that we need to be able to turn on / off the light from three different places. x 3 x 2 f Parityfunction x 1 x 2 x 3 Odd parity f x 1
40 XOR or NAND? x 1 x 2 x 3 Udda paritet f The former solution was based on NAND gates. XOR gates will be much more effective than NAND gates! x 1 x 2 x 3 f x x 2 x f
41 Simpler with XOR gates With XOR-gates: x 1 x 2 x 3 f 7486 ( With NAND-gates: )
42
43 ( Parity check ) With parity function we can check whether data has been disturbed or not. Disturbance! Data transmitted always have even parity! ALARM!? A bit modified!? Data has been disturbed! 0 1 P U P U? Data - orginal Paritybit is added Parity Check Checks if an odd number of "1s is recived error!
44
45 More composition composition can be used to construct the n-bit adder One need n full-adders for constructing an n-bit adder?
46 Ripple-Carry Adder (RCA) a 1 b 1 a 0 b 0 c ut1 FA c in1 c ut0 FA c in0 s 1 s 0 + c ut1 c ut0 b 1 a 1 s 1 c in0 b 0 a 0 s 0
47 Ripple-Carry Adder (RCA) a n-1 b n-1 a 1 b 1 a 0 b 0 c utn-1 FA c inn-1 FA c in1 c ut0 FA c in0 s n-1 s 1 s 0 a n-1 b n-1... a 0 b 0 A FA area for a Fulladder t FA delay trough a Fulladder c utn-1 n-bit ADD s n-1... s 0 c in0 Timedelay from c in0 to c outn-1 is total of n t FA Total area is n A FA
48 Ripple-Carry Adder (RCA) a0 b0 c in0 s0 Critical path a1 b1 s1
49 Fulladder Carry-function & AND-OR A AND-OR = 20 MOS T AND-OR = 5T NAND & NAND-NAND & >1 & & & A NAND-NAND = 14 MOS T NAND-NAND = 3T NAND &
50 XOR with NAND & & & & a b b a b a ab ab b a b b a a b a b b a a = + = = = = + ) ( ) ( ) ( ) ( Area: A XOR =16 MOS Delay: T XOR =3T NAND
51 Can we construct a faster adder? The delay of a ripple adder grows proportionally with the number of bits For 32 bits, the delay becomes very large
52 generate- och propagate- funktionerna p i = x i + y i p i = x Works also! The Carry-chain can be described by two functions: Generate g i ( carry-out c i+1 = 1 if g i = 1 ) Propagate p i ( carry-out c i+1 = 1 if c i = 1 and x i = 1 or y i = 1 ) i y i 0 0 g i = x i y i 1 c = g + i+1 i p i c i c i c i x i y i 0 c = 0 1 c i+ 1 x i x i y i = y i x i y i + c i c ( x i i x = x y c i + c y ( x i ) i y y i+ 1 i i i i i i )
53 Carry-look-ahead function Carry-bit c 0 g i = x i y i c 1 = g 0 + p 0 c 0 Carry-bit c 1 c 2 = g 1 + p 1 c 1 = g 1 + p 1 (g 0 + p 0 c 0 ) Propagate function from previous bits can be generated in parallel p i = x i + y i = g 1 + p 1 g 0 + p 1 p 0 c 0 Only two logic levels is needed
54 Carry-chain in ripple-adder #1 ½ + ½ c 0 OR or XOR can be used for the p function! p 0 g 0 p 1 g 1 #2 #3 #4 c1 c 2 #5 p 2 #6 g 2 6 gate levels c 3
55 Quicker implementation of the Carry-chain Distributive theorem: (a+b)c = ac+bc c 0 p 0 g 0 c 1 p 1 g 1 c 2 c 1 = g 0 +p 0 c 0 c 2 = g 1 +p 1 g 0 +p 1 p 0 c 0 Two- logic levels
56 (n=8) and two logic levels c 1 =g 0 +p 0 c 0 c 2 =g 1 +p 1 g 0 +p 1 p 0 c Fast, but cumbersome with so many inputs! c 8 =g 7 +p 7 g 6 +p 7 p 6 g 5 +p 7 p 6 p 5 g 4 +p 7 p 6 p 5 p 4 g p 7 p 6 p 5 p 4 p 3 g 2 +p 7 p 6 p 5 p 4 p 3 p 2 g p 7 p 6 p 5 p 4 p 3 p 2 p 1 g 0 +p 7 p 6 p 5 p 4 p 3 p 2 p 1 p 0 c 0 Ooops!
57 Carry-lookahead adder (CLA) 8-bit adder c s s s s s s = a a a a a a + b s1s a1a b1b 0 b b b b b a 7 b 7 a 6 b 6 a 5 b 5 a 4 b 4 a 3 b 3 a 2 b 2 a 1 b 1 a 0 b 0 1-bit Full Adder 1-bit Full Adder 1-bit Full Adder 1-bit Full Adder 1-bit Full Adder 1-bit Full Adder 1-bit Full Adder 1-bit Full Adder c 0 s 7 s 6 s 5 s 4 s 3 s 2 s 1 s 0 c 8 p 7 g 7 c 7 p 6 g 6 c 6 p 5 g 5 c 5 p 4 g 4 c 4 p 3 g 3 Carry look ahead unit c 3 p 2 g 2 c 2 p 1 g 1 c 1 p 0 g 0 P 0 G 0 c 8 =g 7 +p 7 g 6 +p 7 p 6 g 5 +p 7 p 6 p 5 g 4 +p 7 p 6 p 5 p 4 g 3 +p 7 p 6 p 5 p 4 p 3 g 2 +p 7 p 6 p 5 p 4 p 3 p 2 g p 7 p 6 p 5 p 4 p 3 p 2 p 1 g 0 + p 7 p 6 p 5 p 4 p 3 p 2 p 1 p 0 c 0
58 Hierarchical expansion (BV page 277) a b a b bit adder a 15-8 b 15-8 a 7-0 b bit adder. Each block consists of a 8-bit CLA. Block 3 CLA Block 2 CLA Block 1 CLA Block 0 CLA G 3 P 3 S G 2 P 2 S G 1 P 1 S 15-8 G 0 P 0 S 7-0 c 8 c 0 First level four 8-bit adders with Carry lookahead c 32 P G P G PG 1 1P0 G0 c 0 c 24 P G 2 2PG 1 1P0 G0 c 16 c 0 PG P 1 1 0G0 c 0 P 0 G 0 c 0 Second level four Carry lookahead units
59 Hierarchical expansion C 8 = G 0 +P 0 c 0 C 16 = G 1 +P 1 G 0 +P 1 P 0 c 0 C 24 = G 2 +P 2 G 1 +P 2 P 1 G 0 +P 2 P 1 P 0 c 0 C 32 = G 3 +P 3 G 2 +P 3 P 2 G 1 +P 3 P 2 P 1 G 0 +P 3 P 2 P 1 P 0 c 0 etc. More gates in sequential steps, but gates with fewer inputs can be used.
60 (Carry look ahead three level hierarchy) 16-bit LCU 64-bit adder 64-bit LCU
61 Carry-Select-Adder (CSA) Idea One divides an adder in two stages with the same number of bits To speed up the process so you calculate the results of the second step in advance for the two cases Carry-in = 0 Carry-in = 1 When the calculation of the carry bit is clear for the first step, then we choose the result of the second step depending on carry the bit value!
62 8-bit Carry-Select-Adder c 8-high b[7:4] a[7:4] a[3:0] b[3:0] 1 0 Add Add Add c 8-low c 0 a b a+b = s Mux c c 8 Mux c c 4 s[7:4] s[3:0] s
63 Ripple-Carry Adder Comparision T(n)= n*2.5*t NAND, A = n*12.5t NAND +T XOR T(4)= 14T NAND, A(4) = 50 A NAND Carry-Lookahead Adder (4bits) T(4)= ~8T NAND, A(4)= 43A NAND +4*4*A NAND = ~60A NAND Carry-Select Adder (8 bits) T(8)= ~(8+4)T NAND, A(8)= ~(120+20)A NAND
64 Which is the best adder? There is no clear answer! Ripple adder takes a minimum of space but is slow Carry-look-ahead adder take much space but it is fast Carry-select adder is a compromise One must make a trade-off between Area and speed
65
66 Subtraction Subtraction can be made by the addition of the two complement Invert all bits of the second operand and add one
67 Add/sub-unit y n 1 y 1 y 0 Add/Sub = 0: Addition Add/Sub = 1: Subtraction Add Sub control x n 1 x 1 x 0 c n n -bit adder c 0 s n 1 s 1 s 0
68 Arithmetic Logic Unit (ALU) Function selection f 0 f 1 AU LU A/L MUX f 0 f 1 A/L x ALU y c in Processors use to have an ALU, not only an adder. A/L f1 f0 Function x+y x+y+c in x-y x-y-c in x or y x and y x xor y inv x
69 Comparator Comparator is implemented as a subtractioncircuit???
70 Comparator Comparator is implemented as a subtractioncircuit
71 Summary Addition and subtraction of integers Two-complement Subtraction of a number is implemented as addition of it s two-complement Trade-Off: Area against Speed Different Adder-structures Ripple-Carry Adder (RCA) Carry-Lookahead Adder (CLA) Carry-Select Adder (CSA)
72
Binary addition by hand. Adding two bits
Chapter 3 Arithmetic is the most basic thing you can do with a computer We focus on addition, subtraction, multiplication and arithmetic-logic units, or ALUs, which are the heart of CPUs. ALU design Bit
More informationLogic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits
Logic and Computer Design Fundamentals Chapter 5 Arithmetic Functions and Circuits Arithmetic functions Operate on binary vectors Use the same subfunction in each bit position Can design functional block
More informationChapter 5 Arithmetic Circuits
Chapter 5 Arithmetic Circuits SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 11, 2016 Table of Contents 1 Iterative Designs 2 Adders 3 High-Speed
More informationCprE 281: Digital Logic
CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Fast Adders CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev HW5
More informationAdders, subtractors comparators, multipliers and other ALU elements
CSE4: Components and Design Techniques for Digital Systems Adders, subtractors comparators, multipliers and other ALU elements Instructor: Mohsen Imani UC San Diego Slides from: Prof.Tajana Simunic Rosing
More informationMidterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two.
Announcements Midterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two. Chapter 5 1 Chapter 3: Part 3 Arithmetic Functions Iterative combinational circuits
More informationChapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>
Chapter 5 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 5 Chapter 5 :: Topics Introduction Arithmetic Circuits umber Systems Sequential Building
More informationARITHMETIC COMBINATIONAL MODULES AND NETWORKS
ARITHMETIC COMBINATIONAL MODULES AND NETWORKS 1 SPECIFICATION OF ADDER MODULES FOR POSITIVE INTEGERS HALF-ADDER AND FULL-ADDER MODULES CARRY-RIPPLE AND CARRY-LOOKAHEAD ADDER MODULES NETWORKS OF ADDER MODULES
More informationChapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.
Chapter 4 Dr. Panos Nasiopoulos Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. Sequential: In addition, they include storage elements Combinational
More informationAdders, subtractors comparators, multipliers and other ALU elements
CSE4: Components and Design Techniques for Digital Systems Adders, subtractors comparators, multipliers and other ALU elements Adders 2 Circuit Delay Transistors have instrinsic resistance and capacitance
More informationCS 140 Lecture 14 Standard Combinational Modules
CS 14 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris 1 Part III. Standard Modules A. Interconnect B. Operators. Adders Multiplier
More informationUNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018
DIGITAL ELECTRONICS SYSTEM DESIGN LL 2018 PROFS. IRIS BAHAR & ROD BERESFORD NOVEMBER 9, 2018 LECTURE 19: BINARY ADDITION, UNSIGNED BINARY NUMBERS For the binary number b n-1 b n-2 b 1 b 0. b -1 b -2 b
More informationNumber System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary
Number System Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary BOOLEAN ALGEBRA BOOLEAN LOGIC OPERATIONS Logical AND Logical OR Logical COMPLEMENTATION
More informationLogic. Combinational. inputs. outputs. the result. system can
Digital Electronics Combinational Logic Functions Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends
More informationCSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing
CSE4: Components and Design Techniques for Digital Systems Decoders, adders, comparators, multipliers and other ALU elements Tajana Simunic Rosing Mux, Demux Encoder, Decoder 2 Transmission Gate: Mux/Tristate
More informationCarry Look Ahead Adders
Carry Look Ahead Adders Lesson Objectives: The objectives of this lesson are to learn about: 1. Carry Look Ahead Adder circuit. 2. Binary Parallel Adder/Subtractor circuit. 3. BCD adder circuit. 4. Binary
More informationCMP 334: Seventh Class
CMP 334: Seventh Class Performance HW 5 solution Averages and weighted averages (review) Amdahl's law Ripple-carry adder circuits Binary addition Half-adder circuits Full-adder circuits Subtraction, negative
More information1 Short adders. t total_ripple8 = t first + 6*t middle + t last = 4t p + 6*2t p + 2t p = 18t p
UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Study Homework: Arithmetic NTU IC54CA (Fall 2004) SOLUTIONS Short adders A The delay of the ripple
More informationCombinational Logic. By : Ali Mustafa
Combinational Logic By : Ali Mustafa Contents Adder Subtractor Multiplier Comparator Decoder Encoder Multiplexer How to Analyze any combinational circuit like this? Analysis Procedure To obtain the output
More informationHardware Design I Chap. 4 Representative combinational logic
Hardware Design I Chap. 4 Representative combinational logic E-mail: shimada@is.naist.jp Already optimized circuits There are many optimized circuits which are well used You can reduce your design workload
More informationELCT201: DIGITAL LOGIC DESIGN
ELCT2: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 4 Following the slides of Dr. Ahmed H. Madian محرم 439 ه Winter 28
More informationCombinational Logic Design Arithmetic Functions and Circuits
Combinational Logic Design Arithmetic Functions and Circuits Overview Binary Addition Half Adder Full Adder Ripple Carry Adder Carry Look-ahead Adder Binary Subtraction Binary Subtractor Binary Adder-Subtractor
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 6 - Combinational Logic Introduction A combinational circuit consists of input variables, logic gates, and output variables. The logic gates accept
More information14:332:231 DIGITAL LOGIC DESIGN
4:332:23 DIGITAL LOGIC DEIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 23 Lecture #4: Adders, ubtracters, and ALUs Vector Binary Adder [Wakerly 4 th Ed., ec. 6., p. 474] ingle
More informationIntroduction to Digital Logic Missouri S&T University CPE 2210 Subtractors
Introduction to Digital Logic Missouri S&T University CPE 2210 Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and Technology cetinkayae@mst.edu
More informationFundamentals of Digital Design
Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric
More informationComputer Architecture 10. Fast Adders
Computer Architecture 10 Fast s Ma d e wi t h Op e n Of f i c e. o r g 1 Carry Problem Addition is primary mechanism in implementing arithmetic operations Slow addition directly affects the total performance
More informationDigital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit
Digital Techniques 1. Binary System The digital computer is the best example of a digital system. A main characteristic of digital system is its ability to manipulate discrete elements of information.
More informationOverview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples
Overview rithmetic circuits Last lecture PLDs ROMs Tristates Design examples Today dders Ripple-carry Carry-lookahead Carry-select The conclusion of combinational logic!!! General-purpose building blocks
More informationECE380 Digital Logic. Positional representation
ECE380 Digital Logic Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Dr. D. J. Jackson Lecture 16-1 Positional representation First consider integers Begin with
More informationCOMBINATIONAL LOGIC FUNCTIONS
COMBINATIONAL LOGIC FUNCTIONS Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends only on the present
More informationEx code
Ex. 8.4 7-4-2-1 code Codeconverter 7-4-2-1-code to BCD-code. When encoding the digits 0... 9 sometimes in the past a code having weights 7-4-2-1 instead of the binary code weights 8-4-2-1 was used. In
More informationCprE 281: Digital Logic
CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Multiplication CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev HW
More informationEECS150. Arithmetic Circuits
EE5 ection 8 Arithmetic ircuits Fall 2 Arithmetic ircuits Excellent Examples of ombinational Logic Design Time vs. pace Trade-offs Doing things fast may require more logic and thus more space Example:
More informationDIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute
DIGITAL TECHNICS Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 4. LECTURE: COMBINATIONAL LOGIC DESIGN: ARITHMETICS (THROUGH EXAMPLES) 2016/2017 COMBINATIONAL LOGIC DESIGN:
More informationHakim Weatherspoon CS 3410 Computer Science Cornell University
Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register
More informationTotal Time = 90 Minutes, Total Marks = 100. Total /10 /25 /20 /10 /15 /20
University of Waterloo Department of Electrical & Computer Engineering E&CE 223 Digital Circuits and Systems Midterm Examination Instructor: M. Sachdev October 30th, 2006 Total Time = 90 Minutes, Total
More informationCombinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.
Combinational Logic ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Combinational Circuits
More informationWe are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors
CSC258 Week 3 1 Logistics If you cannot login to MarkUs, email me your UTORID and name. Check lab marks on MarkUs, if it s recorded wrong, contact Larry within a week after the lab. Quiz 1 average: 86%
More informationUNIT II COMBINATIONAL CIRCUITS:
UNIT II COMBINATIONAL CIRCUITS: INTRODUCTION: The digital system consists of two types of circuits, namely (i) (ii) Combinational circuits Sequential circuits Combinational circuit consists of logic gates
More informationLecture 5: Arithmetic
Lecture 5: Arithmetic COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 5 Binary Representation of Integers Two physical states: call these 1 and
More informationModule 2. Basic Digital Building Blocks. Binary Arithmetic & Arithmetic Circuits Comparators, Decoders, Encoders, Multiplexors Flip-Flops
Module 2 asic Digital uilding locks Lecturer: Dr. Yongsheng Gao Office: Tech 3.25 Email: Web: Structure: Textbook: yongsheng.gao@griffith.edu.au maxwell.me.gu.edu.au 6 lecturers 1 tutorial 1 laboratory
More informationCombinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.
Combinational Logic ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2010 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Combinational Circuits
More informationCombinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan
Combinational Logic Mantıksal Tasarım BBM23 section instructor: Ufuk Çelikcan Classification. Combinational no memory outputs depends on only the present inputs expressed by Boolean functions 2. Sequential
More informationXOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.
XOR - XNOR Gates Lesson Objectives: In addition to AND, OR, NOT, NAND and NOR gates, exclusive-or (XOR) and exclusive-nor (XNOR) gates are also used in the design of digital circuits. These have special
More informationFloating Point Representation and Digital Logic. Lecture 11 CS301
Floating Point Representation and Digital Logic Lecture 11 CS301 Administrative Daily Review of today s lecture w Due tomorrow (10/4) at 8am Lab #3 due Friday (9/7) 1:29pm HW #5 assigned w Due Monday 10/8
More informationAdders - Subtractors
Adders - Subtractors Lesson Objectives: The objectives of this lesson are to learn about: 1. Half adder circuit. 2. Full adder circuit. 3. Binary parallel adder circuit. 4. Half subtractor circuit. 5.
More informationDesign of Sequential Circuits
Design of Sequential Circuits Seven Steps: Construct a state diagram (showing contents of flip flop and inputs with next state) Assign letter variables to each flip flop and each input and output variable
More informationCMPUT 329. Circuits for binary addition
CMPUT 329 Parallel Adder with Carry Lookahead and ALU Ioanis Nikolaidis (Katz & Borriello) rcuits for binary addition Full adder (carry-in to cascade for multi-bit adders) Sum = xor A xor B Cout = B +
More informationChapter 03: Computer Arithmetic. Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design
Chapter 03: Computer Arithmetic Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design Objective To understand adder circuit Subtractor circuit Fast adder circuit 2 Adder Circuit 3 Full
More informationClass Website:
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #5 Instructor: Andrew B. Kahng (lecture) Email: abk@ece.ucsd.edu Telephone: 858-822-4884 office, 858-353-0550 cell Office:
More informationDigital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.
CS211 Computer Architecture Digital Logic l Topics l Transistors (Design & Types) l Logic Gates l Combinational Circuits l K-Maps Figures & Tables borrowed from:! http://www.allaboutcircuits.com/vol_4/index.html!
More informationCMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned
Focus Groups CMSC 33 Lecture 7 Need good sample of all types of CS students Mon /7 & Thu /2, 2:3p-2:p & 6:p-7:3p Announcement: in-class lab Thu /3 Homework 3 Questions Circuits for Addition Midterm Exam
More informationEECS150 - Digital Design Lecture 10 - Combinational Logic Circuits Part 1
EECS5 - Digital Design Lecture - Combinational Logic Circuits Part Feburary 26, 22 John Wawrzynek Spring 22 EECS5 - Lec-cl Page Combinational Logic (CL) Defined y i = f i (x,...., xn-), where x, y are
More informationSample Test Paper - I
Scheme G Sample Test Paper - I Course Name : Computer Engineering Group Marks : 25 Hours: 1 Hrs. Q.1) Attempt any THREE: 09 Marks a) Define i) Propagation delay ii) Fan-in iii) Fan-out b) Convert the following:
More informationReview for Test 1 : Ch1 5
Review for Test 1 : Ch1 5 October 5, 2006 Typeset by FoilTEX Positional Numbers 527.46 10 = (5 10 2 )+(2 10 1 )+(7 10 0 )+(4 10 1 )+(6 10 2 ) 527.46 8 = (5 8 2 ) + (2 8 1 ) + (7 8 0 ) + (4 8 1 ) + (6 8
More informationCombina-onal Logic Chapter 4. Topics. Combina-on Circuit 10/13/10. EECE 256 Dr. Sidney Fels Steven Oldridge
Combina-onal Logic Chapter 4 EECE 256 Dr. Sidney Fels Steven Oldridge Topics Combina-onal circuits Combina-onal analysis Design procedure simple combined to make complex adders, subtractors, converters
More informationCMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays
MS 33 Lecture 8 Midterm Exam returned Assign Homework 3 ircuits for Addition Digital Logic omponents Programmable Logic Arrays UMB, MS33, Richard hang MS 33, omputer Organization & Assembly
More informationUNIVERSITI TENAGA NASIONAL. College of Information Technology
UNIVERSITI TENAGA NASIONAL College of Information Technology BACHELOR OF COMPUTER SCIENCE (HONS.) FINAL EXAMINATION SEMESTER 2 2012/2013 DIGITAL SYSTEMS DESIGN (CSNB163) January 2013 Time allowed: 3 hours
More informationBOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra
BOOLEAN ALGEBRA Introduction 1854: Logical algebra was published by George Boole known today as Boolean Algebra It s a convenient way and systematic way of expressing and analyzing the operation of logic
More informationELEN Electronique numérique
ELEN0040 - Electronique numérique Patricia ROUSSEAUX Année académique 2014-2015 CHAPITRE 3 Combinational Logic Circuits ELEN0040 3-4 1 Combinational Functional Blocks 1.1 Rudimentary Functions 1.2 Functions
More informationMenu. 7-Segment LED. Misc. 7-Segment LED MSI Components >MUX >Adders Memory Devices >D-FF, RAM, ROM Computer/Microprocessor >GCPU
Menu 7-Segment LED MSI Components >MUX >Adders Memory Devices >D-FF, RAM, ROM Computer/Microprocessor >GCPU Look into my... 1 7-Segment LED a b c h GND c g b d f a e h Show 7-segment LED in LogicWorks,
More informationNumbers and Arithmetic
Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu
More informationCMPEN 411 VLSI Digital Circuits Spring Lecture 19: Adder Design
CMPEN 411 VLSI Digital Circuits Spring 2011 Lecture 19: Adder Design [Adapted from Rabaey s Digital Integrated Circuits, Second Edition, 2003 J. Rabaey, A. Chandrakasan, B. Nikolic] Sp11 CMPEN 411 L19
More informationCOMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHIC-LOGIC UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ
OMUTERS ORGANIZATION 2ND YEAR OMUTE SIENE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHI-LOGI UNIT JOSÉ GARÍA RODRÍGUEZ JOSÉ ANTONIO SERRA ÉREZ Tema 3. La Unidad entral de roceso. A.L.U. Arithmetic Logic Unit
More informationBoolean Algebra and Digital Logic 2009, University of Colombo School of Computing
IT 204 Section 3.0 Boolean Algebra and Digital Logic Boolean Algebra 2 Logic Equations to Truth Tables X = A. B + A. B + AB A B X 0 0 0 0 3 Sum of Products The OR operation performed on the products of
More informationUNIT 4 MINTERM AND MAXTERM EXPANSIONS
UNIT 4 MINTERM AND MAXTERM EXPANSIONS Spring 2 Minterm and Maxterm Expansions 2 Contents Conversion of English sentences to Boolean equations Combinational logic design using a truth table Minterm and
More informationChapter 7 Logic Circuits
Chapter 7 Logic Circuits Goal. Advantages of digital technology compared to analog technology. 2. Terminology of Digital Circuits. 3. Convert Numbers between Decimal, Binary and Other forms. 5. Binary
More informationCs302 Quiz for MID TERM Exam Solved
Question # 1 of 10 ( Start time: 01:30:33 PM ) Total Marks: 1 Caveman used a number system that has distinct shapes: 4 5 6 7 Question # 2 of 10 ( Start time: 01:31:25 PM ) Total Marks: 1 TTL based devices
More informationTotal Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18
University of Waterloo Department of Electrical & Computer Engineering E&CE 223 Digital Circuits and Systems Midterm Examination Instructor: M. Sachdev October 23rd, 2007 Total Time = 90 Minutes, Total
More informationCHAPTER1: Digital Logic Circuits Combination Circuits
CS224: Computer Organization S.KHABET CHAPTER1: Digital Logic Circuits Combination Circuits 1 PRIMITIVE LOGIC GATES Each of our basic operations can be implemented in hardware using a primitive logic gate.
More informationChapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction
Chapter 5 igital systems digital system is any machine that processes information encoded in the form of digits. Modern digital systems use binary digits, encoded as voltage levels. Two voltage levels,
More informationLatches. October 13, 2003 Latches 1
Latches The second part of CS231 focuses on sequential circuits, where we add memory to the hardware that we ve already seen. Our schedule will be very similar to before: We first show how primitive memory
More informationCS/COE0447: Computer Organization and Assembly Language
CS/COE0447: Computer Organization and Assembly Language Logic Design Introduction (Brief?) Appendix B: The Basics of Logic Design Dept. of Computer Science Logic design? Digital hardware is implemented
More informationCSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego
CSE4: Components and Design Techniques for Digital Systems Logic minimization algorithm summary Instructor: Mohsen Imani UC San Diego Slides from: Prof.Tajana Simunic Rosing & Dr.Pietro Mercati Definition
More informationIT T35 Digital system desigm y - ii /s - iii
UNIT - II Combinational Logic Adders subtractors code converters binary parallel adder decimal adder magnitude comparator encoders decoders multiplexers demultiplexers-binarymultiplier Parity generator
More informationVLSI Design. [Adapted from Rabaey s Digital Integrated Circuits, 2002, J. Rabaey et al.] ECE 4121 VLSI DEsign.1
VLSI Design Adder Design [Adapted from Rabaey s Digital Integrated Circuits, 2002, J. Rabaey et al.] ECE 4121 VLSI DEsign.1 Major Components of a Computer Processor Devices Control Memory Input Datapath
More informationCSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April
CSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April Objective - Get familiar with the Xilinx ISE webpack tool - Learn how to design basic combinational digital components -
More informationECE/CS 552: Introduction To Computer Architecture 1. Instructor:Mikko H Lipasti. Fall 2010 University i of Wisconsin-Madison
ECE/CS 552: Arithmetic I Instructor:Mikko H Lipasti Fall 2010 Univsity i of Wisconsin-Madison i Lecture notes partially based on set created by Mark Hill. Basic Arithmetic and the ALU Numb representations:
More informationALUs and Data Paths. Subtitle: How to design the data path of a processor. 1/8/ L3 Data Path Design Copyright Joanne DeGroat, ECE, OSU 1
ALUs and Data Paths Subtitle: How to design the data path of a processor. Copyright 2006 - Joanne DeGroat, ECE, OSU 1 Lecture overview General Data Path of a multifunction ALU Copyright 2006 - Joanne DeGroat,
More informationChap 2. Combinational Logic Circuits
Overview 2 Chap 2. Combinational Logic Circuits Spring 24 Part Gate Circuits and Boolean Equations Binary Logic and Gates Boolean Algebra Standard Forms Part 2 Circuit Optimization Two-Level Optimization
More informationECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks
ECE 545 Digital System Design with VHDL Lecture Digital Logic Refresher Part A Combinational Logic Building Blocks Lecture Roadmap Combinational Logic Basic Logic Review Basic Gates De Morgan s Law Combinational
More informationAdditional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals
Additional Gates COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Presentation Outline Additional Gates and Symbols Universality of NAND and NOR gates NAND-NAND
More informationArithmetic in Integer Rings and Prime Fields
Arithmetic in Integer Rings and Prime Fields A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 FA C 3 FA C 2 FA C 1 FA C 0 C 4 S 3 S 2 S 1 S 0 http://koclab.org Çetin Kaya Koç Spring 2018 1 / 71 Contents Arithmetic in Integer
More informationLooking at a two binary digit sum shows what we need to extend addition to multiple binary digits.
A Full Adder The half-adder is extremely useful until you want to add more that one binary digit quantities. The slow way to develop a two binary digit adders would be to make a truth table and reduce
More informationCprE 281: Digital Logic
CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Signed Numbers CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev Administrative
More informationLecture 7: Logic design. Combinational logic circuits
/24/28 Lecture 7: Logic design Binary digital circuits: Two voltage levels: and (ground and supply voltage) Built from transistors used as on/off switches Analog circuits not very suitable for generic
More informationXI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.
2017-18 XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL HALF ADDER 1. The circuit that performs addition within the Arithmetic and Logic Unit of the CPU are called adders. 2. A unit that adds two
More informationL8/9: Arithmetic Structures
L8/9: Arithmetic Structures Acknowledgements: Materials in this lecture are courtesy of the following sources and are used with permission. Rex Min Kevin Atkinson Prof. Randy Katz (Unified Microelectronics
More informationCprE 281: Digital Logic
CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Simple Processor CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev Digital
More informationCDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012
CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline Combinational Logic Design Using a Truth Table Minterm and Maxterm Expansions General Minterm and
More informationDigital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic.
Digital Integrated Circuits A Design Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic Arithmetic Circuits January, 2003 1 A Generic Digital Processor MEM ORY INPUT-OUTPUT CONTROL DATAPATH
More informationComputer Architecture. ESE 345 Computer Architecture. Design Process. CA: Design process
Computer Architecture ESE 345 Computer Architecture Design Process 1 The Design Process "To Design Is To Represent" Design activity yields description/representation of an object -- Traditional craftsman
More informationLecture 8: Sequential Multipliers
Lecture 8: Sequential Multipliers ECE 645 Computer Arithmetic 3/25/08 ECE 645 Computer Arithmetic Lecture Roadmap Sequential Multipliers Unsigned Signed Radix-2 Booth Recoding High-Radix Multiplication
More informationPart II Addition / Subtraction
Part II Addition / Subtraction Parts Chapters I. Number Representation 1. 2. 3. 4. Numbers and Arithmetic Representing Signed Numbers Redundant Number Systems Residue Number Systems Elementary Operations
More informationSection 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic
Section 3: Combinational Logic Design Major Topics Design Procedure Multilevel circuits Design with XOR gates Adders and Subtractors Binary parallel adder Decoders Encoders Multiplexers Programmed Logic
More information( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function
Question Paper Digital Electronics (EE-204-F) MDU Examination May 2015 1. (a) represent (32)10 in (i) BCD 8421 code (ii) Excess-3 code (iii) ASCII code (b) Design half adder using only NAND gates. ( c)
More informationEECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters
EECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters April 15, 2010 John Wawrzynek 1 Multiplication a 3 a 2 a 1 a 0 Multiplicand b 3 b 2 b 1 b 0 Multiplier X a 3 b 0 a 2 b 0 a 1 b
More informationChapter 2: Switching Algebra and Logic Circuits
Chapter 2: Switching Algebra and Logic Circuits Formal Foundation of Digital Design In 1854 George Boole published An investigation into the Laws of Thoughts Algebraic system with two values 0 and 1 Used
More information