CARLETON UNIVERSITY. Laboratory 2.0

Size: px
Start display at page:

Download "CARLETON UNIVERSITY. Laboratory 2.0"

Transcription

1 CARLETON UNIVERSITY Department of Electronics ELEC 267 Switching Circuits Jan 3, 28 Overview Laboratory 2. A 3-Bit Binary Sign-Extended Adder/Subtracter A binary adder sums two binary numbers for example X = and Y= => Sum = The adder, you will build, will find the sum or difference of two 3-bit two s-complement binary numbers represented here by, X = x 2 x x and Y= y 2 y y, and show the result on four output lines. Since some adder applications only do not allow the output sum to expand into an extra bit, it also signals an overflow when the sum is too large or small to be correctly represented with 3 bits. FIGURE A summary and block diagram of the lab circuit. The details are explained later. Two s Complement Numbers 3-bit numbers bit numbers SUB(H) ADD(L) 3 DATA BITS x 2 x x LEAST SWITCH 3 DATA BITS y 2 y y 3-BIT, TWO S COMPLEMENT /subtracter SIGNIFICANT BITS 3-bit sum 22 is too 3-bit s 3 s s big for a 3-bit Overflow 2 s complement numbers Examples 4-bit sum Y X S 3-bit () (-) y 2 y y x 2 x x s 3 s s (2) (2) (3) (-4) (-) (-4) (3) (3) (-3) (-2) (-) - (-4) - ( ) - (-4) - ( ) - ( ) - Negative numbers Overflow happens when 3 bits will not correctly hold the sum, always have a leading. with 3 bit numbers, 4 bits will always hold the correct sum. To change 3-bit 2 s complement numbers into 4-bit 2 s complement: For positive numbers insert a leading. Thus (3) becomes For negative numbers insert a leading. Thus (-3) becomes J.Knight, Jan 3, 8 ELEC 267 Switching Circuits Lab2-

2 Carleton University Background Binary Numbers In decimal numbers, the digits are given a weight according to there position, thus: 325 is or In binary numbers, the bits are given a weight according to there position, thus: is or = 8 4 In decimal Negative numbers could be done in many ways, but the one most used in computer arithmetic is called two s complement Two s complement numbers are weighted like binary numbers except the first bit is given a negative weight.. is ( 8) 4 2 or ( 2 3 ) = In decimal Two s Complement Numbers These are a convenient method of representing negative numbers. They look just like positive binary integers. They are two s compliment only in the way you interpret them. The same hardware can add both positive and negative numbers. Addition is done exactly the same way as for positive binary numbers. A few gates will convert an adder into a subtracter. Negative numbers all start with, i.e. the most significant bit is. There is one more negative number than positive number. (There is -4, but no 4 for 3-bit numbers) Sign Extension (Adding leading Bits to Two s Complement Numbers) Placing leading zeros in front of a positive binary number causes no change. However doing this to a negative two s complement number changes the leading bit from to, making the number positive.. is the same as in a positive binary system 6 = 6 decimal values But is not the same as in a two s complement system decimal values To change a N bit two s complement number into a N bit one: - If the leading bit is, add another leading - If the leading bit is, add another leading FIGURE 2: 3-bit binary numbers FIGURE 3: Some two s complement numbers 3-bit numbers Negative numbers have a leading. Example: changing a 3-bit negative number (-3 decimal) into a 4, 5, 6 and 7-bit number... = = = = 3-bit 4-bit 5-bit 6-bit 7-bit 4-bit numbers Lab2-2 ELEC 267 Switching Circuits J.Knight, Jan 3, 28

3 . Example: of why adding a leading transforms a 3-bit negative number into a 4-bit one... is ( 4) 2 with another leading one is ( 8) = - 4 decimal values -3 = Addition Of Binary Numbers, Including Two s Complement Numbers To add two binary numbers, add them bit-by-bit transfering the carries left to the next column. In positive integer binary adds, the off-end carry is part of the number. Thus adding two three-bit numbers may give a four-bit number, as shown in the box on the left of Fig. 4. (36=9) With two s complement numbers the final off-end carry is always ignored so the result of adding two 3-bit numbers is always a 3-bit number. This lab will only do two s complement adds. FIGURE 4 Two s complement binary addition example. Positive integer binary addition (3) (6) (9) The addition is the same for positive or two s complement numbers, except: For positive numbers include the off-end carry as part of the sum. For two s complement addition ignore the off-end carry, and read the result as two s complement. - If the remaining 3 bits of the number starts with a it is a positive two s complement number. - If the remaining 3 bits of the number starts with a it is a negative two s complement number. - Unless the answer overflows. Overflow in Two s Complement Addition FIGURE 5: Overflow: When adding 3-bit numbers, 3-bits may not be enough to hold the sum. For 3-bit two s complement numbers, the sum must be between -4 and 3 or addition will overflow. Sign Extension Will Cure Overflow Here the off-end carry is part of the answer (3) (2) (5) is too large for 3-bit two s complement. We say it overflows. (- 3) Ignore the off-end carry. (3) (- 2) With 2 s complement numbers, ignore the off-end carry. (- 3) (- 2) (- 5) overflows 3-bit two s complement Carry The leading bit tells the sign of the number. To use sign extension, concatenate a new sign (leading) bit of the same value as the previous sign bit, thus: is sign extended to and is sign extended to. () (3) ignore the off-end carry.. One can sign extend as far as desired, thus as an 8 bit 2 s complement number is. J.Knight,Jan 3, 8 ELEC 267 Switching Circuits Lab2-3

4 Carleton University FIGURE 6 Curing Overflow with sign extension (with sign extension) (3) (2) (5) Ignore the off-end carry. if any (5) If the numbers are sign extended by one bit before adding, the results can never overflow. However the numbers becomes one bit longer, and take more storage. 2 Checking an Addition for Overflow Add the numbers as 3-bit numbers Then do sign extension and add them as 4-bit numbers. If the 3 and 4-bit answers have the same sign, there was no overflow and the 3-bit answer was correct. If they have different signs, there was an overflow, and one must use the 4-bit answer and/or send the user an overflow warning. FIGURE 7 Checking for overflow (3) (2) (5) 3-bit number overflows because the leading is part of the number and cannot be the sign. Sign extension 5 fits into a 4-bit 2 s complement number (- 3) (- 2) (- 5) FIGURE 8 Checking for overflow using the last two bits of the sign extended add. With sign extension 2. Some filter circuits add a hundred or more numbers. If each addition requires a one bit increase, one might start with an 8-bit number and end with a 8-bit number! Lab2-4 ELEC 267 Switching Circuits J.Knight, Jan 3, 28 (with sign extension) Ignore the off-end carry. (- 5) With sign extension Sign extension 5 fits into a 4-bit 2 s complement number Sign extension (3) (2) (- 3) (5) (5) 4-bit two s compliment Ignore. has a 4th bit to give These are the correct sign Ignore. 3-bit sign different. 4-bit sign Signs are different. There is overflow without sign extension With sign extension Sign extension (- 3) (- 3) (- 2) (- 2) (- 5) (- 3) (- 5) (- 5) 3-bit two s compliment 4-bit two s compliment number overflows because Ignore. has a 4th bit to give Ignore. These are the leading bit is not the 3-bit sign the correct sign different correct sign. 4-bit sign Signs are different. There is overflow without sign extension (-3) (-) (- 4) 3-bit number overflows (- 4) Ignore. (-3) (-) (-4) (-4) 4-bit two s compliment has a 4th bit to give the correct sign Ignore. Signs are the same. No overflow. Sign extension not needed Sign extension These are the same No overflow. 4-bit sign

5 Sign extension is not always the answer. Computers store 6 bit integers, and most adds do not overflow. Computers do not store sums as 7 bits. They can store them using 32 bits, but only if necessary. Often one would like to send out a warning signal that the 6 bit addition overflowed and tell the computer to store this sum with 32 bits. To Tell If a Sum Overflowed 3 Bits (Or N Bits in General) Add the numbers with sign extension. Then compare the leftmost two sum bits: If they are equal all is OK. Remember to ignore If they are not equal send out an overflow warning. off-end carry Examples FIGURE 9 Examples of two s complement addition, with and without sign extension and overflow checking. 3-bit addition 3-bit addition 3-bit sum With sign extension 3-bit sum With sign extension (3) (-3) (-4) (-2) (- ) (- 5) Correct No overflow of 3--bit sum. Wrong Overflow of 3-bit sum. 3-bit sum Correct 4-bit sum 3-bit sum Correct 4-bit sum 3-bit addition 3-bit sum (-2) (-2) (- 4) Correct 3-bit sum With sign extension No Overflow. Correct 4-bit sum 4-bit addition 4-bit sum (-3) (-2) (- 5) Correct 4-bit sum With sign extension No Overflow. Correct 5-bit sum 2. Calculation of the Compliment. To Take The Two s Complement Of A Binary Number. Invert each bit. 2. add 3. ignore any carry. Example: Take the 2 s complement of ( in binary). Take, invert bits add one ( is - in 2 s complement) Find the 3-bit two s complement representation of 3, -2, -, -4. using the method above. (You will be asked to do this in the prelab for 5-bit numbers.) Explain what is special about the 3-bit two s complement of -4? 3 Hint: When you add, try sign extending before you add 3-bit numbers Negative numbers always have a leading. 4-bit numbers Two s Complement Numbers 3. Hint: When you add, try sign extending before you add. Then check for overflow. J.Knight,Jan 3, 8 ELEC 267 Switching Circuits Lab2-5

6 Carleton University 2.. The Adder Circuit The Half Adder, an Adder for Two Single-Bit Numbers Until we get into detailed logic, after Step 3.4, will mean plus, not OR. This circuit can add,,, and. It gives a single-bit sum output s i and a single-bit carry output c i The Full-Adder, an Adder for Three Single-Bit Numbers The half-adder is not enough for adding binary numbers. One must be able to add three input bits. The third bit, c i is for a carry input. An Iterative Adder Circuit for Multibit Numbers FIGURE y i x i HALF One can make a multibit adder by combining full adders in an iterative circuit, also called bit-sliced circuits. These are circuits which can be made from identical sections coupled together. FIGURE 2 A 3-bit adder made from three full-adders, an example of an iterative or bit-sliced circuit... c i c i FIGURE y i s i s i x i c i y 2 x 2 y x y x c Not part of sum with 2 s complement numbers c 3 c 2 s c s C = for addition The carry output of one full-adder is sent to the next full-adder. In the above picture, c 3 is ignored in two s complement addition. c is always zero since there is no carry input Adding Multibit Two s Complement Numbers The advantage of two s complement numbers is, that negative numbers are added exactly the same way positive numbers. Thus the positive integer adder circuit in Fig. 2 could be used for adding two s complement integers. However, unlike 3-bit positive integers, adding 3-bit two s complement integers cannot give a 4-bit number. The carry out c 3, is never part of the sum. Remember In two s compliment the off-end carry is never part of the sum! A Two s Complement subtracter To calculate Y - X, one adds Y to the 2 s complement of X. Let X = x n x n-...x x To get the 2 s compliment, inverts each of the bits of X, to get x n x n-...x x and add. In summary, Y - X = Y x n x n-...x x A convenient way to add the, is to use c input. FIGURE 3 A 2 s complement subtracter. x 2 x x For a 3-bit number like X = x 2 x x, inverting each bit gives= x 2 x x y 2 x 2 y x y x c c 3 c 2 c s s Lab2-6 ELEC 267 Switching Circuits J.Knight, Jan 3, 28

7 A Combination Adder-Subtractor One can make a circuit that both adds and subtracts by: () Having the inverters switch in and out of the circuit by external subtract/add control. (2) Making the initial carry in, c = for addition and c = for subtraction. FIGURE 4 Making an adder into a combination add-subtract unit. Sub(H)/Add(L) x 2 SUB(H) ADD(L) Control Switch The switch inverts x i when and does not invert when. When it is, it also injects a into c. c 3 A Controlled Inverter. To build a combination adder/subtracter, one needs a way to invert or not invert on command FIGURE 5 A controlled inverter circuit.. y 2 z 2 c 2 y s x x z y z c s c Sub(H)/Add(L) X i Z i X i Sub(H)/Add(L) gate Z i = X i IF Sub(H)/Add(L) = X i IF Sub(H)/Add(L) = The signal name Sub(H)/Add(L) means subtract when the signal is high () and add when it is low (). The gate in the box, inverts x i when the control signal Sub(H)/Add(L) is, and passes x i with no change when Sub(H)/Add(L) is. This is a fairly common logic gate. Can you give this gate s name? The Sign Extended Adder The sign extended adder repeats the addition of the most significant bits with a different input carry. Does one need a complete full adder for this last circuit. Does the last full adder need a carry out? FIGURE 6 A sign-extended adder. SUB(H) ADD(L) SWITCH Sub(H)/Add(L) x 2 x x y 2 z 2 y z y z? c 3 c 2 c c s 3 s s J.Knight,Jan 3, 8 ELEC 267 Switching Circuits Lab2-7

8 Carleton University FIGURE 7 A sign-extended adder with an overflow check to tell if only 3 bits are needed. Sub(H)/Add(L) x 2 x x SUB(H) Check if 3-bits is enough to hold result ADD(L) NOT EQUAL SWITCH? c 3 y 2 z 2 c 2 y z y z c c 3-Bit_ s 3 s s From Fig. 8 (p. 4) one knows that if s 3 = there is no overflow in the 3-bit sum. if s 3 overflowed 3-bits. Thus one can add an overflow check by using a NOT EQUAL gate. What kind of a gate can check for inequality? FIGURE 8 An inequality detection circuit. Ovf s 3 s 3 s 3 gate Ovf Lab2-8 ELEC 267 Switching Circuits J.Knight, Jan 3, 28

9 Prelab (This must be prepared prior to the scheduled lab session. You must show calculations, since some unscrupulous individuals sometimes sabotage their education by copying raw answers. It will be checked near the start of the lab. It will also be an appendix for your final report.) 3. Convert the binary number to decimal in a system having only positive numbers. Do the same for a system of 2 s complement number? 3. Make a table of 5-bit two s-complement numbers showing them opposite their decimal values. You may put in a row of dots... to save writing, but show the top 3 numbers, the bottom 3 numbers, and at least 2,,, - and Show how to calculate 4-bit two s complement of numbers by inverting and adding. Use 7, - and -8 as examples. Decide if there is a 4-bit two s complement of Do the following (a through d) arithmetic problems as a 3-bit binary sign-extended adder/subtracter would do them. Show how the carries propagate and how the overflow for 3-bits is calculated as is illustrated in Fig. 9 for the 3 bit subtraction of X - Y = (-3) - (2). (a) (2) (2), (b) (-) (-), (c) (-2) (-), (d) (-3) - (-3), (e) (-3) - (3). FIGURE 9 Doing a 2 s complement sign-extended subtract. - Sign Extension (- 3) (2) 3.4 Complete the truth table for a generic full adder. The three inputs are x i, y i, and c i. The two outputs are sum and carry, that is s i and c i Subtract here means invert all bits here (-5) Then the subtraction can be done as addition Provided an extra is added to the least significant bit. Partial Truth Table for a Generic Full Adder Carry Initial carry in, as part of 2 s complement calculation Not Equal Means Overflow y i x i c i c i s i Expression for c i Expression for s i y i x i c i y i x i c i y i x i c i y i x i c i FIGURE 2 c i y i s i x i c i y i x i c i y i x i c i 3.5 Obtain the equations for the generic full adder from the truth table One can learn many things, that may be useful here, from the lecture notes Basic Logic Gates and Formulas athttp:// (there may be a later release) J.Knight,Jan 3, 8 ELEC 267 Switching Circuits Lab2-9

10 Carleton University 3.6 Simplify the equations. Hint : (This may or may not help you) (a b)c ab = (ab ab)c ab Expand xor = abc abc abc abc ab xcx = x (Simplification) = ac bc ab xb xb = x, use twice 3.7 Take the simplified equations you just derived for the full-adder subcircuit and draw a schematic from them. 3.8 What logic gate can function as a controlled inverter? What gate can test two bits for equality? 3.9 Design a generic invert control unit that inverts the x i input when subtract is selected. 3. Design the circuit that detects overflow. 3. Draw a block diagram for the complete 3-bit adder/subtracter. Use blocks, or gates if the block is only one gate, for the standard subcircuits you designed in subsections 3.6, 3.9 and 3.. The figure below gives an idea of what is wanted,. However several necessary things are left out. FIGURE 2 Partial block diagram of the adder/subtracter. SubIf_ x 2 x x input y 2 y y 3-BIT OVERFLOW DETECT c 3 2 c 2 c c s s LEAST SIGNIFC BIT 3.2 You should have at least three types of blocks: full-adders, invert-control, and overflow detect. Draw a schematic of each type of block, with the gates drawn the way they will appear in the lab. This lab will be done with a computer simulation, so you will have as many gates of each type as you need. 3.3 Can one of the additions be done by a simpler circuit than a full adder? If so, use it. 2.2 In the Laboratory The lower-level schematic This circuit will be implemented by drawing circuits on the computer screen the Top-Level Schematic, the Adder Symbol and the Full Adder Symbol are already drawn. You will draw the lower level schematic for the Adder somewhat like the schematic on the right in Fig. 22. You will also draw the Full Adder. The simulation After the schematic is correctly entered, you will need to simulate the circuit. The simulations will come out as wave forms which are hard to read without detailed study. In labaratory reports, you should anotate a representative sample of the 28 cases. See Fig. 23 Lab2- ELEC 267 Switching Circuits J.Knight, Jan 3, 28

11 FIGURE 22 The hierarchy of schematics and symbols used in the lab.. Top-Level Schematic The wires(nets) C,X,Y,X... are seen by the simulator. C Use C for SUB(H)/ADD(L) X X C X X X S X S S2 X S3 X3 Y X Y Y2 Schematic of circuit using the adder and nothing else Net (wire) names on this schematic are the same as on the symbol. They don t have to be. X X Y Y Y2 C S S S2 S3 Adder symbol used in top-level schematic Leads in the schematic are connected to leads of the same name on the symbol, as shown for C and S. C X Y X Y Y2 ADD C S S S2 S3 Lower-level schematic of what is inside the the adder symbol. (Note this circuit is not a real adder) Value of X in decimal X FIGURE 23 How to annotate simulation waveforms so the TA can understand them. X Value of X in decimal Y Y Value of Y in decimal Y2 S S Annotate you waveforms at various interesting spots. Here some values that give a for 2 s complement and 8 for positive numbers are noted. Also some that give an overflow are highlighted. The notation show what the numbers are in decimal. That way someone reading your report can check your results more easily. Write the notes on by hand. It is hard to print them, and they stand out more. Sample annotations here are in blue. S2 Value of S in decimal S3 For pos integers (7) = 8 for 2 s comp - = -=-, 3=4, There is no 4 in 3-bit 2 s comp. hence overflow J.Knight,Jan 3, 8 ELEC 267 Switching Circuits Lab2-

12 Carleton University Lab2-2 ELEC 267 Switching Circuits J.Knight, Jan 3, 28

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design 60-265: Winter 2010 Computer Architecture I: Digital Design ANSWERS Exercise 4 Combinational Circuit Design Question 1. One-bit Comparator [ 1 mark ] Consider two 1-bit inputs, A and B. If we assume that

More information

Binary Adders: Half Adders and Full Adders

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 information

Chapter 3: part 3 Binary Subtraction

Chapter 3: part 3 Binary Subtraction Chapter 3: part 3 Binary Subtraction Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead adders Binary subtraction Binary adder-subtractors Signed binary

More information

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture Points ddressed in this Lecture Lecture 6: Signed Numbers rithmetic Circuits Professor Peter Cheung Department of EEE, Imperial College London (Floyd 2.5-2.7, 6.1-6.7) (Tocci 6.1-6.11, 9.1-9.2, 9.4) Representing

More information

CS/COE 0447 Example Problems for Exam 2 Spring 2011

CS/COE 0447 Example Problems for Exam 2 Spring 2011 CS/COE 0447 Example Problems for Exam 2 Spring 2011 1) Show the steps to multiply the 4-bit numbers 3 and 5 with the fast shift-add multipler. Use the table below. List the multiplicand (M) and product

More information

Digital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand

Digital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand Digital Arithmetic Digital Arithmetic: Operations and Circuits Dr. Farahmand Binary Arithmetic Digital circuits are frequently used for arithmetic operations Fundamental arithmetic operations on binary

More information

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions EE210: Switching Systems Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions Prof. YingLi Tian Feb. 5/7, 2019 Department of Electrical Engineering The City College of New

More information

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Binary Addition. Add the binary numbers and and show the equivalent decimal addition. Binary Addition The rules for binary addition are 0 + 0 = 0 Sum = 0, carry = 0 0 + 1 = 0 Sum = 1, carry = 0 1 + 0 = 0 Sum = 1, carry = 0 1 + 1 = 10 Sum = 0, carry = 1 When an input carry = 1 due to a previous

More information

Chapter 4 Arithmetic Functions

Chapter 4 Arithmetic Functions Logic and Computer Design Fundamentals Chapter 4 Arithmetic Functions Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Overview Iterative combinational

More information

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C) COP 273, Winter 26 Exercises 2 - combinational logic Questions. How many boolean functions can be defined on n input variables? 2. Consider the function: Y = (A B) (A C) B (a) Draw a combinational logic

More information

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng Slide Set 1 for ENEL 339 Fall 2014 Lecture Section 02 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2014 ENEL 353 F14 Section

More information

(Refer Slide Time 6:48)

(Refer Slide Time 6:48) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 8 Karnaugh Map Minimization using Maxterms We have been taking about

More information

THE LOGIC OF COMPOUND STATEMENTS

THE LOGIC OF COMPOUND STATEMENTS CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 2.5 Application: Number Systems and Circuits for Addition Copyright Cengage Learning. All rights reserved.

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014 Problem 1 (4 parts, 21 points) Encoders and Pass Gates Part A (8 points) Suppose the circuit below has the following input priority: I 1 > I 3 > I 0 > I 2. Complete the truth table by filling in the input

More information

Basic Arithmetic (adding and subtracting)

Basic Arithmetic (adding and subtracting) Basic Arithmetic (adding and subtracting) Digital logic to show add/subtract Boolean algebra abstraction of physical, analog circuit behavior 1 0 CPU components ALU logic circuits logic gates transistors

More information

Step 1: Downloading the source files

Step 1: Downloading the source files Introduction: In this lab and in the remainder of the ELEC 2607 labs, you will be using the Xilinx ISE to enter and simulate the designs for your circuits. In labs 3 and 4, you will use ISE to compile

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Prof. Montek Singh Spring 2018 Lab #2A: Hierarchical Design & Verilog Practice Issued Wed 1/17/18; Due Wed 1/24/18

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 541 Digital Logic and Computer Design Spring 2015 Lab #2: Hierarchical Design & Verilog Practice Issued Wed. 1/14/15; Due Wed. 1/21/15 (11:59pm) This

More information

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS Name: Instructor: Engr. Date Performed: Marks Obtained: /10 Group Members (ID):. Checked By: Date: Experiment # 09 MULTIPLEXERS OBJECTIVES: To experimentally verify the proper operation of a multiplexer.

More information

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15 1.) CLD2 problem 2.2 We are allowed to use AND gates, OR gates, and inverters. Note that all of the Boolean expression are already conveniently expressed in terms of AND's, OR's, and inversions. Thus,

More information

CO Computer Architecture and Programming Languages CAPL. Lecture 9

CO Computer Architecture and Programming Languages CAPL. Lecture 9 CO20-320241 Computer Architecture and Programming Languages CAPL Lecture 9 Dr. Kinga Lipskoch Fall 2017 A Four-bit Number Circle CAPL Fall 2017 2 / 38 Functional Parts of an ALU CAPL Fall 2017 3 / 38 Addition

More information

Introduction to Computer Engineering (E114)

Introduction to Computer Engineering (E114) Introduction to Computer Engineering (E114) Lab 1: Full Adder 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

More information

Arithmetic Logic Unit. Digital Computer Design

Arithmetic Logic Unit. Digital Computer Design Arithmetic Logic Unit Digital Computer Design Arithmetic Circuits Arithmetic circuits are the central building blocks of computers. Computers and digital logic perform many arithmetic functions: addition,

More information

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

Chapter 4. Combinational Logic

Chapter 4. Combinational Logic Chapter 4. Combinational Logic Tong In Oh 1 4.1 Introduction Combinational logic: Logic gates Output determined from only the present combination of inputs Specified by a set of Boolean functions Sequential

More information

Review. Pipeline big-delay CL for faster clock Finite State Machines extremely useful You ll see them again in 150, 152 & 164

Review. Pipeline big-delay CL for faster clock Finite State Machines extremely useful You ll see them again in 150, 152 & 164 CS61C L17 Combinatorial Logic Blocks (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17 Combinatorial Logic Blocks 2007-7-24 Scott Beamer, Instructor Review Pipeline big-delay CL

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds. ECE-78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds. UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers of ): DIGIT 3 4 5 6 7 8 9 Number:

More information

COS 116 The Computational Universe Laboratory 8: Digital Logic II

COS 116 The Computational Universe Laboratory 8: Digital Logic II COS 116 The Computational Universe Laboratory 8: Digital Logic II In this lab you ll learn that, using only AND, OR, and NOT gates, you can build a circuit that can add two numbers. If you get stuck at

More information

(Refer Slide Time 3:31)

(Refer Slide Time 3:31) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 5 Logic Simplification In the last lecture we talked about logic functions

More information

EE292: Fundamentals of ECE

EE292: Fundamentals of ECE EE292: Fundamentals of ECE Fall 2012 TTh 10:00-11:15 SEB 1242 Lecture 22 121115 http://www.ee.unlv.edu/~b1morris/ee292/ 2 Outline Review Binary Number Representation Binary Arithmetic Combinatorial Logic

More information

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 CS 64 Lecture 2 Data Representation Reading: FLD 1.2-1.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1

More information

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 3 DLD P VIDYA SAGAR DLD UNIT III Combinational Circuits (CC), Analysis procedure, Design Procedure, Combinational circuit for different code converters and other problems, Binary Adder- Subtractor, Decimal Adder, Binary Multiplier,

More information

Digital Logic Design (3)

Digital Logic Design (3) Digital Logic Design (3) ENGG1015 1 st Semester, 2010 Dr. Kenneth Wong Dr. Hayden So Department of Electrical and Electronic Engineering Last lecture ll logic functions can be represented as (1) truth

More information

CS101 Lecture 04: Binary Arithmetic

CS101 Lecture 04: Binary Arithmetic CS101 Lecture 04: Binary Arithmetic Binary Number Addition Two s complement encoding Briefly: real number representation Aaron Stevens (azs@bu.edu) 25 January 2013 What You ll Learn Today Counting in binary

More information

Experiment 7 Arithmetic Circuits Design and Implementation

Experiment 7 Arithmetic Circuits Design and Implementation Experiment 7 Arithmetic Circuits Design and Implementation Introduction: Addition is just what you would expect in computers. Digits are added bit by bit from right to left, with carries passed to the

More information

Experiment 4 Boolean Functions Implementation

Experiment 4 Boolean Functions Implementation Experiment 4 Boolean Functions Implementation Introduction: Generally you will find that the basic logic functions AND, OR, NAND, NOR, and NOT are not sufficient to implement complex digital logic functions.

More information

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

Number System. Introduction. Decimal Numbers

Number System. Introduction. Decimal Numbers Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

More information

INF2270 Spring Philipp Häfliger. Lecture 4: Signed Binaries and Arithmetic

INF2270 Spring Philipp Häfliger. Lecture 4: Signed Binaries and Arithmetic INF2270 Spring 2010 Philipp Häfliger Lecture 4: Signed Binaries and Arithmetic content Karnaugh maps revisited Binary Addition Signed Binary Numbers Binary Subtraction Arithmetic Right-Shift and Bit Number

More information

Arithmetic-logic units

Arithmetic-logic units Arithmetic-logic units An arithmetic-logic unit, or ALU, performs many different arithmetic and logic operations. The ALU is the heart of a processor you could say that everything else in the CPU is there

More information

CAD4 The ALU Fall 2009 Assignment. Description

CAD4 The ALU Fall 2009 Assignment. Description CAD4 The ALU Fall 2009 Assignment To design a 16-bit ALU which will be used in the datapath of the microprocessor. This ALU must support two s complement arithmetic and the instructions in the baseline

More information

Real Digital Problem Set #6

Real Digital Problem Set #6 Real igital Problem et #6. (2 points) ketch a block diagram for a magnitude comparator bit-slice circuit. Create K-maps to define the bit-slice circuit, and use them to find optimal logic equations. ketch

More information

Digital Techniques. Lecture 1. 1 st Class

Digital Techniques. Lecture 1. 1 st Class Digital Techniques Lecture 1 1 st Class Digital Techniques Digital Computer and Digital System: Digital computer is a part of digital system, it based on binary system. A block diagram of digital computer

More information

Logic Gates and Boolean Algebra ENT263

Logic Gates and Boolean Algebra ENT263 Logic Gates and Boolean Algebra ENT263 Logic Gates and Boolean Algebra Now that we understand the concept of binary numbers, we will study ways of describing how systems using binary logic levels make

More information

Experiment # 5 Debugging via Simulation using epd

Experiment # 5 Debugging via Simulation using epd 1. Synopsis: Experiment # 5 Debugging via Simulation using epd In this lab you will be debugging an arbitrary design. We have introduced different kinds of errors in the design purposefully to demonstrate

More information

Review. Steps to writing (stateless) circuits: Create a logic function (one per output)

Review. Steps to writing (stateless) circuits: Create a logic function (one per output) MIPS ALU Review Steps to writing (stateless) circuits: Create a truth table Go through all different combinations of inputs For each row, generate each output based on the problem description Create a

More information

Parallel logic circuits

Parallel logic circuits Computer Mathematics Week 9 Parallel logic circuits College of Information cience and Engineering Ritsumeikan University last week the mathematics of logic circuits the foundation of all digital design

More information

1. Mark the correct statement(s)

1. Mark the correct statement(s) 1. Mark the correct statement(s) 1.1 A theorem in Boolean algebra: a) Can easily be proved by e.g. logic induction b) Is a logical statement that is assumed to be true, c) Can be contradicted by another

More information

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals.

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 352 Digital System Fundamentals. Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE/C 352 Digital ystem Fundamentals Quiz #2 Thursday, March 7, 22, 7:15--8:3PM 1. (15 points) (a) (5 points) NAND, NOR

More information

Chapter 3 Part 2 Combinational Logic Design

Chapter 3 Part 2 Combinational Logic Design University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 Chapter 3 Part 2 Combinational Logic Design Originals by: Charles R. Kime and Tom

More information

Week 7: Assignment Solutions

Week 7: Assignment Solutions Week 7: Assignment Solutions 1. In 6-bit 2 s complement representation, when we subtract the decimal number +6 from +3, the result (in binary) will be: a. 111101 b. 000011 c. 100011 d. 111110 Correct answer

More information

Get Free notes at Module-I One s Complement: Complement all the bits.i.e. makes all 1s as 0s and all 0s as 1s Two s Complement: One s complement+1 SIGNED BINARY NUMBERS Positive integers (including zero)

More information

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93

Combinational Logic. Prof. Wangrok Oh. Dept. of Information Communications Eng. Chungnam National University. Prof. Wangrok Oh(CNU) 1 / 93 Combinational Logic Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) / 93 Overview Introduction 2 Combinational Circuits 3 Analysis Procedure

More information

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012

Digital Systems. John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC. December 6, 2012 Digital Systems John SUM Institute of Technology Management National Chung Hsing University Taichung, ROC December 6, 2012 Contents 1 Logic Gates 3 1.1 Logic Gate............................. 3 1.2 Truth

More information

Dr. S. Shirani COE2DI4 Midterm Test #1 Oct. 14, 2010

Dr. S. Shirani COE2DI4 Midterm Test #1 Oct. 14, 2010 Dr. S. Shirani COE2DI4 Midterm Test #1 Oct. 14, 2010 Instructions: This examination paper includes 9 pages and 20 multiple-choice questions starting on page 3. You are responsible for ensuring that your

More information

E40M. Binary Numbers, Codes. M. Horowitz, J. Plummer, R. Howe 1

E40M. Binary Numbers, Codes. M. Horowitz, J. Plummer, R. Howe 1 E40M Binary Numbers, Codes M. Horowitz, J. Plummer, R. Howe 1 Reading Chapter 5 in the reader A&L 5.6 M. Horowitz, J. Plummer, R. Howe 2 Useless Box Lab Project #2 Adding a computer to the Useless Box

More information

COMP 122/L Lecture 2. Kyle Dewey

COMP 122/L Lecture 2. Kyle Dewey COMP 122/L Lecture 2 Kyle Dewey Outline Operations on binary values AND, OR, XOR, NOT Bit shifting (left, two forms of right) Addition Subtraction Twos complement Bitwise Operations Bitwise AND Similar

More information

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014 Instructions: This is a closed book, closed note exam. Calculators are not permitted. If you have a question, raise your hand and I will come to you. Please work the exam in pencil and do not separate

More information

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4] HW 3 Answer Key 1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4] You can build a NAND gate from tri-state buffers and inverters and thus you

More information

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T.

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. Binary Arithmetic Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. MIT 6.004 Fall 2018 Reminder: Encoding Positive Integers Bit i in a binary representation (in right-to-left order)

More information

Chapter 4 Arithmetic

Chapter 4 Arithmetic Computer Eng 1 (ECE290) Chapter 4 Arithmetic Functions and Circuits HOANG Trang Reference: 2008 Pearson Education, Inc. Lecture note of Prof.Donna J.Brown Overview Binary adders Half and full adders Ripple

More information

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points)

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points) ELEC 2010 Laboratory Manual Experiment 9 In-Lab Procedure Page 1 of 7 Experiment 9: Binary Arithmetic Circuits In-Lab Procedure and Report (30 points) Before starting the procedure, record the table number

More information

Chapter 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 <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 information

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map Points Addressed in this Lecture Lecture 4: Logic Simplication & Karnaugh Map Professor Peter Cheung Department of EEE, Imperial College London Standard form of Boolean Expressions Sum-of-Products (SOP),

More information

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator Richland College Engineering Technology Rev. 0. Donham Rev. 1 (7/2003) J. Horne Rev. 2 (1/2008) J. radbury Digital Fundamentals CETT 1425 Lab 6 2 s Complement / Digital Calculator Name: Date: Objectives:

More information

8/27/2016. ECE 120: Introduction to Computing. Graphical Illustration of Modular Arithmetic. Representations Must be Unambiguous

8/27/2016. ECE 120: Introduction to Computing. Graphical Illustration of Modular Arithmetic. Representations Must be Unambiguous University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Signed Integers and 2 s Complement Strategy: Use Common Hardware for Two Representations

More information

Part 2,Number Systems Questions

Part 2,Number Systems Questions Part 2,Number Systems Questions This study guide is provided as an aid in helping you to study for the ECE Department s 18-240, Fundamentals of Computer Engineering. The guide is a collection of previous

More information

2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS).

2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS). 2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS). 2.. Natural Binary Code (NBC). The positional code with base 2 (B=2), introduced in Exercise, is used to encode

More information

Combinational Logic II

Combinational Logic II Combinational Logic II Ranga Rodrigo July 26, 2009 1 Binary Adder-Subtractor Digital computers perform variety of information processing tasks. Among the functions encountered are the various arithmetic

More information

CSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session

CSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session Name: Email Username: Lab Date and Time: CSC 101: Lab #5 Boolean Logic Practice Due Date: 5:00pm, day after lab session Lab Report: Answer the questions within this document as you encounter them. Also,

More information

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits Equipment and Components Quartus software and Altera DE2-115 board PART 1: Number Representation in Microsoft Calculator. First, let s

More information

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16

University of Florida EEL 3701 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering Revision 0 12-Jun-16 Page 1/14 Quartus Tutorial with Basic Graphical Gate Entry and Simulation Example Problem Given the logic equation Y = A*/B + /C, implement this equation using a two input AND gate, a two input OR gate

More information

QUESTION BANK FOR TEST

QUESTION BANK FOR TEST CSCI 2121 Computer Organization and Assembly Language PRACTICE QUESTION BANK FOR TEST 1 Note: This represents a sample set. Please study all the topics from the lecture notes. Question 1. Multiple Choice

More information

Chapter 6 Combinational-Circuit Building Blocks

Chapter 6 Combinational-Circuit Building Blocks Chapter 6 Combinational-Circuit Building Blocks Commonly used combinational building blocks in design of large circuits: Multiplexers Decoders Encoders Comparators Arithmetic circuits Multiplexers A multiplexer

More information

EEE130 Digital Electronics I Lecture #4_1

EEE130 Digital Electronics I Lecture #4_1 EEE130 Digital Electronics I Lecture #4_1 - Boolean Algebra and Logic Simplification - By Dr. Shahrel A. Suandi 4-6 Standard Forms of Boolean Expressions There are two standard forms: Sum-of-products form

More information

A B A+B

A B A+B ECE 25 Lab 2 One-bit adder Design Introduction The goal of this lab is to design a one-bit adder using programmable logic on the BASYS board. Due to the limitations of the chips we have in stock, we need

More information

Chapter 2 Bits, Data Types, and Operations

Chapter 2 Bits, Data Types, and Operations Chapter 2 Bits, Data Types, and Operations Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University How do we represent data in a computer?!

More information

CS/COE 0447 Example Problems for Exam 2 Fall 2010

CS/COE 0447 Example Problems for Exam 2 Fall 2010 CS/COE 0447 Example Problems for Exam 2 Fall 2010 1. This time, consider a non-leaf function lisa. This function has no arugments or return value. The return address is on the stack at offset 12 and the

More information

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS EE 2 Lab Manual, EE Department, KFUPM EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS OBJECTIVES: Design and implement a circuit that performs basic binary arithmetic operations such as addition, subtraction,

More information

Computer Architecture and Organization

Computer Architecture and Organization 3-1 Chapter 3 - Arithmetic Computer Architecture and Organization Miles Murdocca and Vincent Heuring Chapter 3 Arithmetic 3-2 Chapter 3 - Arithmetic Chapter Contents 3.1 Fixed Point Addition and Subtraction

More information

Unit 2: Accentuate the Negative Name:

Unit 2: Accentuate the Negative Name: Unit 2: Accentuate the Negative Name: 1.1 Using Positive & Negative Numbers Number Sentence A mathematical statement that gives the relationship between two expressions that are composed of numbers and

More information

LABORATORY # 6 * L A B M A N U A L. Datapath Components - Adders

LABORATORY # 6 * L A B M A N U A L. Datapath Components - Adders Department of Electrical Engineering University of California Riverside Laboratory #6 EE 120 A LABORATORY # 6 * L A B M A N U A L Datapath Components - Adders * EE and CE students must attempt also to

More information

Simplification of Boolean Functions

Simplification of Boolean Functions COM111 Introduction to Computer Engineering (Fall 2006-2007) NOTES 5 -- page 1 of 5 Introduction Simplification of Boolean Functions You already know one method for simplifying Boolean expressions: Boolean

More information

Combinational Circuits

Combinational Circuits Combinational Circuits Combinational circuit consists of an interconnection of logic gates They react to their inputs and produce their outputs by transforming binary information n input binary variables

More information

Principles of Computer Architecture. Chapter 3: Arithmetic

Principles of Computer Architecture. Chapter 3: Arithmetic 3-1 Chapter 3 - Arithmetic Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 3: Arithmetic 3-2 Chapter 3 - Arithmetic 3.1 Overview Chapter Contents 3.2 Fixed Point Addition

More information

ELEC 326: Class project

ELEC 326: Class project ELEC 326: Class project Kartik Mohanram 1 Introduction For this project you will design and test a three-digit binary-coded-decimal (BCD) adder capable of adding positive and negative BCD numbers. In the

More information

Chapter 2: Universal Building Blocks. CS105: Great Insights in Computer Science

Chapter 2: Universal Building Blocks. CS105: Great Insights in Computer Science Chapter 2: Universal Building Blocks CS105: Great Insights in Computer Science Homework 1 It is now available on our website. Answer questions in Word or any text editor and upload it via sakai. No paper

More information

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey 2. Introduction Logic gates are connected together to produce a specified output for certain specified combinations of input

More information

Propositional Calculus. Math Foundations of Computer Science

Propositional Calculus. Math Foundations of Computer Science Propositional Calculus Math Foundations of Computer Science Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they can use it to

More information

Advanced Computer Architecture-CS501

Advanced Computer Architecture-CS501 Advanced Computer Architecture Lecture No. 34 Reading Material Vincent P. Heuring & Harry F. Jordan Chapter 6 Computer Systems Design and Architecture 6.1, 6.2 Summary Introduction to ALSU Radix Conversion

More information

R10. II B. Tech I Semester, Supplementary Examinations, May

R10. II B. Tech I Semester, Supplementary Examinations, May SET - 1 1. a) Convert the following decimal numbers into an equivalent binary numbers. i) 53.625 ii) 4097.188 iii) 167 iv) 0.4475 b) Add the following numbers using 2 s complement method. i) -48 and +31

More information

Digital Logic Design Exercises. Assignment 1

Digital Logic Design Exercises. Assignment 1 Assignment 1 For Exercises 1-5, match the following numbers with their definition A Number Natural number C Integer number D Negative number E Rational number 1 A unit of an abstract mathematical system

More information

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6- Binary Addition 6-2 Representing Signed Numbers 6-3 Addition in the 2 s- Complement System 6-4 Subtraction in the 2 s- Complement

More information

Combinational Logic Circuits

Combinational Logic Circuits Combinational Logic Circuits By Dr. M. Hebaishy Digital Logic Design Ch- Rem.!) Types of Logic Circuits Combinational Logic Memoryless Outputs determined by current values of inputs Sequential Logic Has

More information

that system. weighted value associated with it. numbers. a number. the absence of a signal. MECH 1500 Quiz 2 Review Name: Class: Date:

that system. weighted value associated with it. numbers. a number. the absence of a signal. MECH 1500 Quiz 2 Review Name: Class: Date: Name: Class: Date: MECH 1500 Quiz 2 Review True/False Indicate whether the statement is true or false. 1. The decimal system uses the number 9 as its base. 2. All digital computing devices perform operations

More information

1. Draw general diagram of computer showing different logical components (3)

1. Draw general diagram of computer showing different logical components (3) Tutorial 1 1. Draw general diagram of computer showing different logical components (3) 2. List at least three input devices (1.5) 3. List any three output devices (1.5) 4. Fill the blank cells of the

More information

Revision: August 31, E Main Suite D Pullman, WA (509) Voice and Fax

Revision: August 31, E Main Suite D Pullman, WA (509) Voice and Fax Exercise 7: Combinational rithmetic Circuits Revision: ugust 3, 29 25 E Main uite D Pullman, W 9963 (59) 334 636 Voice and Fax TUDENT I am submitting my own work, and I understand penalties will be assessed

More information

Combinational Logic Use the Boolean Algebra and the minimization techniques to design useful circuits No feedback, no memory Just n inputs, m outputs

Combinational Logic Use the Boolean Algebra and the minimization techniques to design useful circuits No feedback, no memory Just n inputs, m outputs Combinational Logic Use the Boolean Algebra and the minimization techniques to design useful circuits No feedback, no memory Just n inputs, m outputs and an arbitrary truth table Analysis Procedure We

More information

Lecture 10: Combinational Circuits

Lecture 10: Combinational Circuits Computer Architecture Lecture : Combinational Circuits Previous two lectures.! TOY machine. Net two lectures.! Digital circuits. George Boole (85 864) Claude Shannon (96 2) Culminating lecture.! Putting

More information