Chapter 3 Part 2 Combinational Logic Design

Size: px
Start display at page:

Download "Chapter 3 Part 2 Combinational Logic Design"

Transcription

1 University of Wisconsin - Madison EE/omp ci 352 Digital ystems Fundamentals Kewal K. aluja and u Hen Hu pring 2002 hapter 3 Part 2 ombinational Logic Design Originals by: harles R. Kime and Tom Kamisnski Modified for course use by: Kewal K. aluja and u Hen Hu Functional Blocks: Addition Binary addition occurs frequently in digital and computer systems. In this section, we: Develop a Half-Adder (HA), a 2-input bitwise addition functional block, Develop a Full-Adder (), a 3-input bitwise addition functional block, Iterate full-adders using a ripple-carry to perform parallel binary addition, and Develop a arry-look-ahead AdderLA to improve performance. hapter Functional Block: Half-Adder Logic implification: Half-Adder A 2-input, -bit width binary adder that produces the following values: A half adder adds two bits to produce a two-bit sum. The sum is expressed as a sum bit, and a carry bit,. 0 0 The half adder can be specified 0 0 as a combined truth table 0 for and : The K-Map for, is: This is a pretty trivial map! By inspection: = + = = ( + ) ( + ) and = = (( ) ) These equations lead to several implementations hapter hapter Five Implementations: Half-Adder Implementations: Half-Adder We can derive following sets of equations for a half - adder: (a) = + (d) = ( + ) = (b) ( ) ( ) (c) = = = + + (e) = = ( ) = + ( + ) = (a), (b), and (e) are OP, PO, and OR implementations for. In (c), the function is used as a term in the AND- NOR implementation of, and in (d), the function is used in a PO term for. The most common half adder implementation (e) is: = = A NAND only implementation (equivalent to equation d) is: = ( + ) = (( ) ) hapter hapter 3-2 6

2 Functional Block: Full-Adder Design: Full-Adder A full adder is similar to a half adder, but includes a carry-in bit from lower stages. Like the half-adder, it computes a sum bit, and a carry bit,. For a carry-in (Z) of zero, it is the same as the half-adder: For a carry- in (Z) of one: Z Z Full-Adder Function Table: Full-Adder K-Map: Z Z Z hapter hapter Design: Full-Adder Implementation: Full Adder From the K-Map, we get: = Z + Z + Z + Z = + Z + Z The function is the three-bit OR function (Odd Function): = Z The arry bit is if both and are (the sum is 2), or if the sum is and a carry-in (Z) occurs. Thus can be re-written as: = + ( )Z The term is carry generate. The term is carry propagate. hapter Full Adder chematic i Here,, and Z, and (from the previous pages) are A, B, i and o respectively. Also, G = Generate and P = Propagate. Note: This is really a combination of a 3-bit odd function (for = sum) and arry logic: (G = Generate) OR (P =Propagate AND i = arry In) o = G + P i A B G P o hapter Parallel Binary Adders 4-bit Ripple-arry Binary Adder To add more than one bit, we "bundle" sets of logical signals together and build devices that operate on the whole set in parallel. Example: 4-bit binary adder: Adds an input vector "A(3..0) " to "B(3..0) to get a sum (3..0) thus: Output Note: the carry out of tage i arry becomes the carry in of tage i+. Description ubscript Name Input arry 0 0 i Augend 0 A i Addend 0 0 B i um 0 i 0 0 i+ hapter 3-2 A four-bit Full Adder made from four -bit Full Adders: A(3) B(3) (4) (3) (2) () (0) (3) (2) Here is a Full-Adder from before: A(2) A() A(0) B(2) B() B(0) () o P i (0) G A B hapter

3 arry Propagation & Delay arry Look-Ahead One problem with the addition of binary numbers is the length of time to propagate the ripple carry from the least significant bit to the most significant bit. The gate-level propagation path for a 4-bit ripple carry adder of the last example: (4) Note: The "long path" is from A(0) or B(0) though the network to either (4) or (3). A(3) B(3) (3) A(2) A() A(0) B(2) B() B(0) (3) (2) () (2) () (0) (0) hapter Given tage i from a Full Adder, we know that there will be a carry generated when A i = B i = "", whether or not there is a carry-in. Alternately, there will be a carry propagated if the Gi "Half-um" is "" and a carry-in, i occurs. These two signal conditions are called Generate denoted as G i, and Propagate denoted as P i respectively and are shown here: i+ Ai Bi i Pi i hapter arry Look-Ahead (ontinued) arry Look-Ahead (ontinued) By defining the equations for the Full Adder in term of the P i and G i, we have: P i = Ai Bi Gi = Ai Bi And the output sum (i) and carry (i+) is defined as: i = Pi i i+ = Gi + Pi i tarting the stage numbering at zero, we have: 4 = G3 G2 G P G0 P P0 0 where 0 is a carry in to the least significant bit. Look at the following addition examples, all of which generate a carry of out of the third stage: xxx +xxx xxxx xx +0xx 0xxx x +00x 00xx x Generate a carry in tage3. Generate a carry in tage 2 and propagate it through stage 3. Generate a carry in tage and propagate it through stage 2 & stage 3. Generate a carry in stage 0 and propagate it through tage, stage 2, & stage 3. Use a carry into stage 0 and propagate it through stage 0, tage, stage 2 & stage 3. hapter hapter Group arry Look-Ahead Logic omplements Figure 3-28 in the text shows how to implement a carry lookahead circuit for four bits. This could be extended to more than four bits. In practice, though, it becomes more difficult to implement this over more than a few bits. The concept can be extended another level by considering a Group Generate (G 0-3 ) and Group Propagate (P 0-3 ) logic condition: G0-3 = G3 G2 G P P0 G0 P0-3 = P3 P P0 Using these two equations: 4 = G0-3 + P0-30 Thus, it is possible to have four 4-bit adders use one of the same carry look-ahead circuits to add 6 bits! ubtraction of numbers requires a different algorithm from that for addition Adding the complement of a number is equivalent to subtraction We will discuss two complements: Diminished Radix omplement Radix omplement ubtraction will be done by adding the complement of the subtrahend hapter hapter

4 Diminished Radix omplement Given a number N in Base r having n digits, the (r ) s-complement (called the Diminished Radix omplement) is defined as: (r n ) N Example: For r = 0, N = 2340, n = 4 (4 digits),we have: (r n ) = 0,000 = The 9's complement of 2340 is then: = Binary 's omplement For r = 2, N = 000 2, n = 8 (8 digits): (r n ) = = or 2 The 's complement of is then: ince the 2 n factor consists of all 's and since 0 = and = 0, the one's complement is obtained by complementing each individual bit(bitwise NOT). hapter hapter Radix omplement Binary 2's omplement Given a number N in Base r having n digits, the r's complement (called the radix complement) is defined as: r n N for N 0 and 0 for N = 0 The radix complement is obtained by adding to the diminished radix complement Example: For r = 0, N = 234 0, n = 4 (4 digits), we have: r n = 0,000 0 The 0's complement of 234 is then 0, = or (9's complement plus ) For r = 2, N = 000 2, n = 8 (8 digits), we have: (r n ) = 2560 or The 2's complement of 000 is then: Note the result is the 's complement plus hapter hapter Alternate 2 s omplement ubtraction with Radix omplements Given: an n -bit binary number, beginning at the right and proceeding left: opy all least significant 0 s opy the first omplement all bits thereafter. 2 s omplement Example: opy underlined bits: 00 and complement bits to the left: 0000 For n-digit, unsignednumbers M and N, find M - N in base r: Add the r's complement of the subtrahend N to the minuend M: M + (r n - N) = M - N + r n If M > N, the sum produces end carry r n which is discarded; from above, M - N remains. If M < N, the sum does not produce an end carry and, from above, is equal to r n - ( N - M ), the r's complement of ( N - M ). To obtain the result - (N M), take the r's complement of the sum and place a - in front. hapter hapter

5 Unsigned 0 s omplement ubtraction Example Unsigned 0 s omplement ubtraction Example 2 Find s comp The carry of indicates that no correction of the result is required. Find s comp s comp The carry of 0 indicates that a correction of the result is required. Result = (520) hapter hapter Unsigned 2 s omplement ubtraction Example Unsigned 2 s omplement ubtraction Example 2 Find s comp The carry of indicates that no correction of the result is required. Find s comp s comp The carry of 0 indicates that a correction of the result is required. Result = (000000) hapter hapter ubtraction with Diminished Radix omplement Unsigned s omplement ubtraction Example For n-digit, unsigned numbers M and N, find M - N in base r: Add the (r - )'s complement of the subtrahend N to the minuend M: M + (r n - - N) = M - N + r n - If M > N, the result is excess by r n -. The end carry r n when discarded removes r n, leaving a result short by. To fix this shortage, whenever and end carry occurs we all in the LB position. This is called end-around carry. If M < N, the sum does not produce an end carry and, from above, is equal to r n - - ( N - M ), the r - 's complement of ( N - M ). To obtain the result - (N M), take the r - 's complement of the sum and place a - in front. Find s comp The end-around carry occurs. hapter hapter

6 Unsigned s omplement ubtraction Example 2 igned Integers Find s comp+ 000 s comp The carry of 0 indicates that a correction of the result is required. Result = (000000) hapter Positive numbers and zero can be represented by unsigned n-digit, radix r numbers. We need a representation for negative numbers. To represent a sign (+ or ) we need exactly one more bit of information ( binary digit gives 2 = 2 elements which is exactly what is needed). ince computers use binary numbers, by convention, (and, for convenience), the most significant bit is interpreted as a sign bit: s a n 2 a 2 a a 0 where: s = 0 for Positive numbers s = for Negative numbers and a i = 0 or represent in some form the magnitude. hapter igned Integer Representations igned-magnitude here the n digits are interpreted as a positive magnitude. igned-omplement here the digits are interpreted as the rest of the complement of the number. There are two possibilities here: igned One's omplement Uses 's omplement Arithmetic igned Two's omplement Use 2's omplement Arithmetic igned Integer Representation Example r =2, n=3 Number ign-mag. 's omp. 2's omp hapter hapter igned-magnitude Arithmetic igned-omplement Arithmetic Addition: If signs are the same:. Add the magnitudes. 2. heck for overflow (a carry into the sign bit). 3. The sign of the result is the same. If the signs differ:. ubtract the subtrahend from the minuend 2. If a borrow occurs, take the two s complement of result and make the sign the complement ofthe sign of the minuend. 3. Overflow will never occur. ubtraction: omplement the sign bit of the number you are subtracting and follow the rules for addition. hapter Addition:. Add the numbers including the sign bits, discarding a carry out of the sign bits (2's omplement), or using an end-around carry ('s omplement). 2. If the sign bits were the same for both numbers and the sign of the result is different, an overflow has occurred. 3. The sign of the result is computed in step. ubtraction: Form the complement of the number you are subtracting and follow the rules for addition. hapter

7 Examples igned-magnitude arithmetic igned 2 s complement arithmetic igned s complement arithmetic 2 s omplement Adder/ubtractor ubtraction can be accomplished by addition of the Two's omplement.. omplement each bit (One's omp.) 2. Add one to the result. The following circuit computes A - B: When the arry-in is, the 2 s comp of B is formed using ORs to form the s comp and adding the on (0). A(3) B(3) A(2) A() A(0) B(2) B() B(0) (0) (4) (3) (2) () o x y i hapter (3) (2) () (0) hapter Overflow Detection and comments Overflow detection example omments on hardware for ign-magnitude omplement-based Overflow detection hardware Binary Multiplication The binary digit multiplication table is trivial: (a b) b = 0 b = a = a = 0 This is simply the Boolean AND function. Form larger products the same way we form larger products in base 0. hapter hapter Review of Decimal Multiplication Example: (237 x 49) Base 0 Perform base 0 multiplication by: omputing partial products, and Justifying and summing the partial products. To compute partial products: Multiply the row of multiplicand digits by each multiplier digit, one at a time. Partial product formation here require carries to be added more complex than binary Partial products are: 237 9, 237 4, and 237 Note that the partial product summation for n digit, base 0 numbers requires adding up to n digits (with carries). Note also n x m digit multiply generates up to an m+n digit result hapter hapter

8 Binary Multiplication Algorithm We compute base 2 multiplication by: omputing partial products, and Justifying and summing the partial products. (same as decimal!) To compute partial products: Multiply the row of multiplicand digits by each multiplier digit, one at a time. With binary numbers, partial products are very simple! They are either: all zero (if the multiplier digit is zero), or the same as the multiplicand (if the multiplier digit is one). Note: No carries are added in partial product formation! hapter Example: (0 x 0) Base 2 Partial products are: 0 x 0, 0 x, and 0 x Note that the partial product summation for n digit, base 2 numbers requires adding up to n digits (with carries) 0 in a column Note also n x m digit multiply generates up to an m + n digit result (same as decimal) hapter Multiplier Boolean Equations Multiplier Arrays Using Adders We can also make an n x m "block" multiplier and use that to form partial products. Example: 2 x 2 The logic equations for each partial-product binary digit are shown below: We need to "add" the columns b b 0 to get the product bits P0, a a 0 P,, and P3. (a 0 b ) (a 0 b 0 ) + (a b ) (a b 0 ) Note that some P 3 P 2 P P 0 columns may generate carries. An implementation of the 2 x 2 multiplier array is shown (Figure 3-33): A B HA o A B HA o b b0 a0 a hapter P3 P P0 hapter Multiplier Using Wide Adders A more "structured" way to develop an n m multiplier is to sum partial products using adder trees The partial products are formed using an n m array of AND gates Partial products are summed using m adders of width n bits Example: 4-bit by 3-bit adder Text Figure 3-34 shows a 4 3 = 2 element array of AND gates and 2 4-bit adders ellular Multiplier Arrays Another way to implement multipliers is to use an n m cellular array structure of uniform elements as shown: Each element computes a single bit product arry [ j, k ] equal to a i b j, and implements a single bit full adder olumn um from above ell [ j, k ] pp [ j, k ] b[ k ] a[ j ] A B arry [ j, (k - )] olumn um to below hapter hapter

9 BD Addition A four-bit binary adder, with a correction circuit, can be used for BD digit addition. For the correction circuit: The BD code is correct if the sum is 9 or less The BD code is incorrect: if the adder output is 0,,2,3,4,5, or if the 4-bit adder produces a carry out We correct the sum by subtracting 0 (usually by the equivalent addition of 6 modulo 6) The Boolean equation with value for doing a correction: = K + Z Z 3 + Z2 Z3 If =, 00 is added; else 0000 is added. This can be done by adding 0 0. Also is the Output carry. BD Addition (ontinued) The resulting circuit (Figure 3-35): hapter hapter Overview of Verilog Part Objectives Objectives Verilog Basics Notation Keywords & onstructs Operators Types of Descriptions tructural Dataflow Boolean Equations onditions using Binary ombinations onditions using Binary Decisions Behavioral & Hierarchical Process (Procedural) not discussed To become familiar with the hardware description language (HDL) approach to specifying designs Be able to read a simple Verilog HDL description Be able to write a simple Verilog HDL description using a limited set of syntax and semantics Understanding the need for a hardware view when reading and writing an HDL hapter hapter Verilog Notation - Verilog Notation - 2 Verilog is: ase sensitive Based on the programming language omments ingle Line // [end of line] Multiple Line /* */ List element separator:, tatement terminator: ; Binary Values for onstants and Variables 0,x Unknown Z,z High impedance state (open circuit) onstants n b[integer]: b =, 8 b = , 4 b00= 00, 8 bxxxxxxxx, 8 bxxxx = 0000xxxx n h[integer]: 8 ha9 = 0000, 6 hf= Identifier Examples calar: A,,RUN,stop,m,n Vector: sel[0:2], f[0:5], A[3:0], UM[5:0], sum[5:0] hapter hapter

10 Verilog Keywords & onstructs - Keywords are lower case module fundamental building block for Verilog designs Used to construct design hierarchy annot be nested ends a module not a statement => no ; Module Declaration module module_name (module_port, module_port, ); Example: module full_adder (A, B, c_in, c_out, ); Verilog Keywords & onstructs - 2 Input Declaration calar input list of input identifiers; Example: input A, B, c_in; Vector input[range] list of input identifiers; Example: input[5:0] A, B, data; Output Declaration calar Example: output c_out, OV, MINU; Vector Example: output[7:0] A, REG_IN, data_out; hapter hapter Verilog Keywords & onstructs - 3 Verilog Operators - Primitive Gates buf, not, and, or, nand, nor, xor, xnor yntax: gate_operator instance_identifier (output, input_, input_2, ) Examples: and A (F, A, B); //F = A B or O (w, a, b, c) O2 (x, b, c, d, e); //w=a+b+c,x=b+c+d+e Bitwise Operators ~ NOT & AND OR ^ OR ^~ or ~^ NOR Example: input[3:0] A, B; output[3:0] Z ; assign Z = A ~B; hapter hapter Verilog Operators - 2 tructural Verilog Arithmetic Operators +, -, (plus others) Logical & Relational Operators!, &&,, = =,!=, >=, <=, >, < (plus others) oncatenation & Replication Operators {identifier_, identifier_2, } {n{identifier}} Examples: {REG_IN[6:0],erial_in}, {8 { b0}} ircuits can be described by a netlist as a text alternative to a diagram - Example (ee Figure 3-59 in text): module fig359s (A0, B0, 0,, 0); input A0, B0, 0; output, 0; //even internal wires needed wire[:7] N; //Ports on primitive gates listed output port first not G (N[3],0), G2 (N[5],N[2]), G3 (N[6],N[3]); nand G4 (N[],A0,B0); nor G5 (N[2],A0,B0), G6 (,N[2],N[4]); and G7 (N[4],N[],N[3]), G8 (N[7],N[],N[5]); xor G9 (0,N[6],N[7]); hapter hapter

11 Dataflow Verilog - Dataflow Verilog - 2 ircuit function can be described by assignstatements using Boolean equations (ee Figure 3-59 in text): module fig359d (A0, B0, 0,, 0); input A0, B0, 0; output, 0; wire[:2] N; assignn[] = ~(A0 & B0); /*Note: annot write ~& for NAND */ assignn[2] = ~(A0 B0); assign = ~((N[] & ~0) N[2]); assign0 = (~N[2] & N[])^(~(~0)); hapter ircuit function can be described by assignstatements using the conditional operator with binary combinations as in a truth table (ee Figure 3-4 in text): module fig34dm (A, E_n, D_n); input[:0] A; input E_n; output[3:0] D_n; //onditional: ()? : Z - if is true, then,else Z assign D_n = {4{E_n}}&( (A == 2'b00)? 4'b0: (A == 2'b0)? 4'b0: (A == 2'b0)? 4'b0: (A == 2'b)? 4'b0: 4'bxxxx); hapter Dataflow Verilog - 3 Behavioral & Hierarchical Verilog ircuit function can be described by assignstatements using the conditional operator for binary decisions on inputs(ee Figure 3-4 in text): module fig34dc (A, E_n, D_n); input[:0] A; input E_n; output[3:0] D_n; /* onditional: ()? : Z - if is true, then,else Z */ assignd_n = {4{E_n}} & (A[]? (A[0]? 4'h7 : 4'hB): (A[0]? 4'hD : 4'hE)); ircuit function can be described by assignstatements at higher than the logic level (ee Figure 3-3 in text): module addsub (A, B, R, sub) ; input [3:0] A, B ; output [3:0] R ;//ee Fig. 3-5 for carry out input sub ; wire [3:0] data_out; add A (A, data_out, sub, R); Mcomp (B, data_out, sub); hapter hapter Behavioral & Hierarchical Verilog ummary module add (,, _in, ); input [3:0], ; input _in; output [3:0] ; assign = + + {3'b0, _in}; module Mcomp (data_in, data_out, comp); input[3:0] data_in; input comp; output [3:0] data_out; assigndata_out = {4{comp}} ^ data_in; Analysis Forward backward trace through the circuit to obtain output equations or truth table Vice versa will also find the equations and truth table Know the functions performed by the following functional blocks: Decoders, Demultiplexers, Encoders, Multiplexers Know how to implement Boolean functions using: Multiplexers Decoders hapter hapter

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

Overview of Verilog Part 1

Overview of Verilog Part 1 University of Wisconsin - Madison ECE/Comp ci 352 Digital ystems Fundamentals Charles R. Kime ection 2 Fall 2001 Chapters 3 and 4 Verilog Part 1 Minor Updates on 11/9/01 are shown in red. Charles Kime

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

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Charles R. Kime Section 2 Fall 2001 Chapter 3 Combinational Logic Design Part 4 Charles Kime & Thomas Kaminski Complements

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

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

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

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

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

Overview. EECS Components and Design Techniques for Digital Systems. Lec 16 Arithmetic II (Multiplication) Computer Number Systems.

Overview. EECS Components and Design Techniques for Digital Systems. Lec 16 Arithmetic II (Multiplication) Computer Number Systems. Overview EE 15 - omponents and Design Techniques for Digital ystems Lec 16 Arithmetic II (Multiplication) Review of Addition Overflow Multiplication Further adder optimizations for multiplication LA in

More information

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library

Chap.3 3. Chap reduces the complexity required to represent the schematic diagram of a circuit Library 3.1 Combinational Circuits 2 Chap 3. logic circuits for digital systems: combinational vs sequential Combinational Logic Design Combinational Circuit (Chap 3) outputs are determined by the present applied

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

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit

Arithmetic Circuits. Nurul Hazlina Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit Nurul Hazlina 1 1. Adder 2. Multiplier 3. Arithmetic Logic Unit (ALU) 4. HDL for Arithmetic Circuit Nurul Hazlina 2 Introduction 1. Digital circuits are frequently used for arithmetic operations 2. Fundamental

More information

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE 1 Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates, and output

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

Chapter 3 Arithmetic for Computers

Chapter 3 Arithmetic for Computers Chapter 3 Arithmetic for Computers 1 Arithmetic Where we've been: Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: Implementing the Architecture operation

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

ECE468 Computer Organization & Architecture. The Design Process & ALU Design

ECE468 Computer Organization & Architecture. The Design Process & ALU Design ECE6 Computer Organization & Architecture The Design Process & Design The Design Process "To Design Is To Represent" Design activity yields description/representation of an object -- Traditional craftsman

More information

*Instruction Matters: Purdue Academic Course Transformation. Introduction to Digital System Design. Module 4 Arithmetic and Computer Logic Circuits

*Instruction Matters: Purdue Academic Course Transformation. Introduction to Digital System Design. Module 4 Arithmetic and Computer Logic Circuits Purdue IM:PACT* Fall 2018 Edition *Instruction Matters: Purdue Academic Course Transformation Introduction to Digital System Design Module 4 Arithmetic and Computer Logic Circuits Glossary of Common Terms

More information

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS 2-2. 2-2.2 Learning Outcomes piral 2 2 Arithmetic Components and Their Efficient Implementations I know how to combine overflow and subtraction results to determine comparison results of both signed and

More information

DIGITAL 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 DIGITAL TECHNIC Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 4. LECTURE: COMBINATIONAL LOGIC DEIGN: ARITHMETIC (THROUGH EXAMPLE) 2nd (Autumn) term 28/29 COMBINATIONAL LOGIC

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

CSE140 L. Instructor: Thomas Y. P. Lee January 18,2006. CSE140L Course Info

CSE140 L. Instructor: Thomas Y. P. Lee January 18,2006. CSE140L Course Info CSE4 L Instructor: Thomas Y. P. Lee January 8,26 CSE4L Course Info Lectures Wedesday :-:2AM, HSS33 Lab Assignment egins TA s JinHua Liu (jhliu@cs.ucsd.edu) Contact TAs if you re still looking for a lab

More information

EE 109 Unit 6 Binary Arithmetic

EE 109 Unit 6 Binary Arithmetic EE 109 Unit 6 Binary Arithmetic 1 2 Semester Transition Point At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is

More information

UNIT II - COMBINATIONAL LOGIC Part A 2 Marks. 1. Define Combinational circuit A combinational circuit consist of logic gates whose outputs at anytime are determined directly from the present combination

More information

Addition and multiplication

Addition and multiplication Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it s not as easy as you might expect! These next few lectures focus on addition, subtraction, multiplication

More information

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS

Learning Outcomes. Spiral 2 2. Digital System Design DATAPATH COMPONENTS 2-2. 2-2.2 Learning Outcomes piral 2 2 Arithmetic Components and Their Efficient Implementations I know how to combine overflow and subtraction results to determine comparison results of both signed and

More information

CS Spring Combinational Examples - 1

CS Spring Combinational Examples - 1 S 5 - Spring 2 - ombinational Examples - ombinational Logic esign ase Studies General esign Procedure for ombinational Logic General design procedure Examples alendar subsstem to 7-segment displa controller

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

Numbering Systems. Number Representations Part 1

Numbering Systems. Number Representations Part 1 Introduction Verilog HDL modeling language allows numbers being represented in several radix systems. The underlying circuit processes the number in binary, however, input into and output from such circuits

More information

Learning Outcomes. Spiral 2-2. Digital System Design DATAPATH COMPONENTS

Learning Outcomes. Spiral 2-2. Digital System Design DATAPATH COMPONENTS 2-2. 2-2.2 Learning Outcomes piral 2-2 Arithmetic Components and Their Efficient Implementations I understand the control inputs to counters I can design logic to control the inputs of counters to create

More information

MULTIPLICATION TECHNIQUES

MULTIPLICATION TECHNIQUES Learning Objectives EE 357 Unit 2a Multiplication Techniques Perform by hand the different methods for unsigned and signed multiplication Understand the various digital implementations of a multiplier

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

Combinational Circuit Design

Combinational Circuit Design Modeling Combinational Circuits with Verilog Prof. Chien-Nan Liu TEL: 3-42275 ext:34534 Email: jimmy@ee.ncu.edu.tw 3- Combinational Circuit Design Outputs are functions of inputs inputs Combinational Circuit

More information

Digital Systems and Binary Numbers

Digital Systems and Binary Numbers Digital Systems and Binary Numbers Mano & Ciletti Chapter 1 By Suleyman TOSUN Ankara University Outline Digital Systems Binary Numbers Number-Base Conversions Octal and Hexadecimal Numbers Complements

More information

Design Using Verilog

Design Using Verilog EGC220 Design Using Verilog Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu Basic Verilog Lexical Convention Lexical convention are close to C++. Comment // to the of the line. /* to

More information

D I G I T A L C I R C U I T S E E

D I G I T A L C I R C U I T S E E D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,

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

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26) Lecture Topics Today: Integer Arithmetic (P&H 3.1-3.4) Next: continued 1 Announcements Consulting hours Introduction to Sim Milestone #1 (due 1/26) 2 1 Overview: Integer Operations Internal representation

More information

Korea University of Technology and Education

Korea University of Technology and Education MEC52 디지털공학 Binary Systems Jee-Hwan Ryu School of Mechanical Engineering Binary Numbers a 5 a 4 a 3 a 2 a a.a - a -2 a -3 base or radix = a n r n a n- r n-...a 2 r 2 a ra a - r - a -2 r -2...a -m r -m

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

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

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

Contents. Appendix D Verilog Summary Page 1 of 16

Contents. Appendix D Verilog Summary Page 1 of 16 Appix D Verilog Summary Page 1 of 16 Contents Appix D Verilog Summary... 2 D.1 Basic Language Elements... 2 D.1.1 Keywords... 2 D.1.2 Comments... 2 D.1.3 Identifiers... 2 D.1.4 Numbers and Strings... 3

More information

Computer Architecture Set Four. Arithmetic

Computer Architecture Set Four. Arithmetic Computer Architecture Set Four Arithmetic Arithmetic Where we ve been: Performance (seconds, cycles, instructions) Abstractions: Instruction Set Architecture Assembly Language and Machine Language What

More information

14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages

14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages 14:332:231 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 2013 Lecture #22: Introduction to Verilog Hardware Description Languages Basic idea: Language constructs

More information

Chapter 2 Basic Logic Circuits and VHDL Description

Chapter 2 Basic Logic Circuits and VHDL Description Chapter 2 Basic Logic Circuits and VHDL Description We cannot solve our problems with the same thinking we used when we created them. ----- Albert Einstein Like a C or C++ programmer don t apply the logic.

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

Semester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC

Semester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC 1 2 Semester Transition Point EE 109 Unit 11 Binary Arithmetic At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is

More information

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

Final Exam Solution Sunday, December 15, 10:05-12:05 PM Last (family) name: First (given) name: Student I.D. #: Circle section: Kim Hu Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE/CS 352 Digital System Fundamentals

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

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

COMBINATIONAL LOGIC CIRCUITS

COMBINATIONAL LOGIC CIRCUITS COMBINATIONAL LOGIC CIRCUITS 4.1 INTRODUCTION The digital system consists of two types of circuits, namely: (i) Combinational circuits and (ii) Sequential circuits A combinational circuit consists of logic

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

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

10.1. Unit 10. Signed Representation Systems Binary Arithmetic 0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system

More information

Digital Systems and Binary Numbers

Digital Systems and Binary Numbers Digital Systems and Binary Numbers ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2018 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outline

More information

Chapter 5 Design and Implementation of a Unified BCD/Binary Adder/Subtractor

Chapter 5 Design and Implementation of a Unified BCD/Binary Adder/Subtractor Chapter 5 Design and Implementation of a Unified BCD/Binary Adder/Subtractor Contents Chapter 5... 74 5.1 Introduction... 74 5.2 Review of Existing Techniques for BCD Addition/Subtraction... 76 5.2.1 One-Digit

More information

carry in carry 1101 carry carry

carry in carry 1101 carry carry Chapter Binary arithmetic Arithmetic is the process of applying a mathematical operator (such as negation or addition) to one or more operands (the values being operated upon). Binary arithmetic works

More information

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(

More information

Chapter 2 Part 4 Combinational Logic Circuits

Chapter 2 Part 4 Combinational Logic Circuits University of Wisconsin - Madison EE/omp Sci 352 Digital Systems undamentals Kewal K. Saluja and Yu Hen Hu Spring 2002 hapter 2 Part 4 ombinational Logic ircuits Originals by: harles R. Kime and Tom Kamisnski

More information

Chapter 3: Dataflow Modeling

Chapter 3: Dataflow Modeling Chapter 3: Dataflow Modeling Prof. Soo-Ik Chae Digital System Designs and Practices Using Verilog HDL and FPGAs @ 2008, John Wiley 3-1 Objectives After completing this chapter, you will be able to: Describe

More information

Digital Systems Design

Digital Systems Design Digital Systems Design Review of Combinatorial Circuit Building Blocks: VHDL for Combinational Circuits Dr. D. J. Jackson Lecture 2-1 Introduction to VHDL Designer writes a logic circuit description in

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: 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

Logic, Words, and Integers

Logic, Words, and Integers Computer Science 52 Logic, Words, and Integers 1 Words and Data The basic unit of information in a computer is the bit; it is simply a quantity that takes one of two values, 0 or 1. A sequence of k bits

More information

Chapter 1. Digital Systems and Binary Numbers

Chapter 1. Digital Systems and Binary Numbers Chapter 1. Digital Systems and Binary Numbers Tong In Oh 1 1.1 Digital Systems Digital age Characteristic of digital system Generality and flexibility Represent and manipulate discrete elements of information

More information

ECE331: Hardware Organization and Design

ECE331: Hardware Organization and Design ECE331: Hardware Organization and Design Lecture 9: Binary Addition & Multiplication Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Pop Quiz! Using 4 bits signed integer notation:

More information

9/6/2011. Multiplication. Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding

9/6/2011. Multiplication. Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 9/6/2 Multiplication Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 2 2 4 6 8 2 4 6 8 3 3 6 9 2

More information

Hardware Description Language VHDL (1) Introduction

Hardware Description Language VHDL (1) Introduction Hardware Description Language VHDL (1) Introduction Digital Radiation Measurement and Spectroscopy NE/RHP 537 Introduction Hardware description language (HDL) Intended to describe circuits textually, for

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

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital hardware modules that accomplish a specific information-processing task. Digital systems vary in

More information

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Arithmetic (a) The four possible cases Carry (b) Truth table x y

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Arithmetic (a) The four possible cases Carry (b) Truth table x y Arithmetic A basic operation in all digital computers is the addition and subtraction of two numbers They are implemented, along with the basic logic functions such as AND,OR, NOT,EX- OR in the ALU subsystem

More information

Verilog Dataflow Modeling

Verilog Dataflow Modeling Verilog Dataflow Modeling Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Source:

More information

Functional Block: Decoders

Functional Block: Decoders University of Wisconsin - Madison EE/omp Sci 352 Digital Systems Fundamentals harles R. Kime Section 2 Fall 2 hapter 3 ombinational Logic Design Part 2 Tom Kaminski & harles R. Kime harles Kime & Thomas

More information

ECE 30 Introduction to Computer Engineering

ECE 30 Introduction to Computer Engineering ECE 30 Introduction to Computer Engineering Study Problems, Set #6 Spring 2015 1. With x = 1111 1111 1111 1111 1011 0011 0101 0011 2 and y = 0000 0000 0000 0000 0000 0010 1101 0111 2 representing two s

More information

CS Computer Architecture. 1. Explain Carry Look Ahead adders in detail

CS Computer Architecture. 1. Explain Carry Look Ahead adders in detail 1. Explain Carry Look Ahead adders in detail A carry-look ahead adder (CLA) is a type of adder used in digital logic. A carry-look ahead adder improves speed by reducing the amount of time required to

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

CPE 335 Computer Organization. MIPS Arithmetic Part I. Content from Chapter 3 and Appendix B

CPE 335 Computer Organization. MIPS Arithmetic Part I. Content from Chapter 3 and Appendix B CPE 335 Computer Organization MIPS Arithmetic Part I Content from Chapter 3 and Appendix B Dr. Iyad Jafar Adatped from Dr. Gheith Abandah Slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html

More information

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)

(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B) COMPUTER ARITHMETIC 1. Addition and Subtraction of Unsigned Numbers The direct method of subtraction taught in elementary schools uses the borrowconcept. In this method we borrow a 1 from a higher significant

More information

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT UNIT-III 1 KNREDDY UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT Register Transfer: Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Micro operations Logic

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

Digital Design with FPGAs. By Neeraj Kulkarni

Digital Design with FPGAs. By Neeraj Kulkarni Digital Design with FPGAs By Neeraj Kulkarni Some Basic Electronics Basic Elements: Gates: And, Or, Nor, Nand, Xor.. Memory elements: Flip Flops, Registers.. Techniques to design a circuit using basic

More information

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence GATE Postal Correspondence Computer Sc. & IT 1 Digital Logic Computer Sciencee & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,

More information

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog Verilog Radek Pelánek and Šimon Řeřucha Contents 1 Computer Aided Design 2 Basic Syntax 3 Gate Level Modeling 4 Behavioral Modeling Computer Aided Design Hardware Description Languages (HDL) Verilog C

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

Introduction to Verilog HDL. Verilog 1

Introduction to Verilog HDL. Verilog 1 Introduction to HDL Hardware Description Language (HDL) High-Level Programming Language Special constructs to model microelectronic circuits Describe the operation of a circuit at various levels of abstraction

More information

Timing for Ripple Carry Adder

Timing for Ripple Carry Adder Timing for Ripple Carry Adder 1 2 3 Look Ahead Method 5 6 7 8 9 Look-Ahead, bits wide 10 11 Multiplication Simple Gradeschool Algorithm for 32 Bits (6 Bit Result) Multiplier Multiplicand AND gates 32

More information

CPE300: Digital System Architecture and Design

CPE300: Digital System Architecture and Design CPE300: Digital System Architecture and Design Fall 2011 MW 17:30-18:45 CBC C316 Arithmetic Unit 10122011 http://www.egr.unlv.edu/~b1morris/cpe300/ 2 Outline Recap Fixed Point Arithmetic Addition/Subtraction

More information

ECE 341 Midterm Exam

ECE 341 Midterm Exam ECE 341 Midterm Exam Time allowed: 75 minutes Total Points: 75 Points Scored: Name: Problem No. 1 (8 points) For each of the following statements, indicate whether the statement is TRUE or FALSE: (a) A

More information

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of

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

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii)

CONTENTS CHAPTER 1: NUMBER SYSTEM. Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii) CONTENTS Foreword...(vii) Preface... (ix) Acknowledgement... (xi) About the Author...(xxiii) CHAPTER 1: NUMBER SYSTEM 1.1 Digital Electronics... 1 1.1.1 Introduction... 1 1.1.2 Advantages of Digital Systems...

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 #3: Designing an ALU Issued Wed 1/21/15; Due Wed 1/28/15 (11:59pm) This lab assignment consists

More information

Lecture (02) Operations on numbering systems

Lecture (02) Operations on numbering systems Lecture (02) Operations on numbering systems By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2018, CSE202 Logic Design I Complements of a number Complements are used in digital computers to simplify

More information

CARLETON UNIVERSITY. Laboratory 2.0

CARLETON UNIVERSITY. Laboratory 2.0 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

More information

Data Representation Type of Data Representation Integers Bits Unsigned 2 s Comp Excess 7 Excess 8

Data Representation Type of Data Representation Integers Bits Unsigned 2 s Comp Excess 7 Excess 8 Data Representation At its most basic level, all digital information must reduce to 0s and 1s, which can be discussed as binary, octal, or hex data. There s no practical limit on how it can be interpreted

More information

Arithmetic and Logical Operations

Arithmetic and Logical Operations Arithmetic and Logical Operations 2 CMPE2c x +y + sum Or in tabular form Binary Addition Carry Out Sum B A Carry In Binary Addition And as a full adder a b co ci sum 4-bit Ripple-Carry adder: Carry values

More information

Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number. Chapter 3

Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number. Chapter 3 Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number Chapter 3 Area Efficient, Low Power Array Multiplier for Signed and Unsigned Number Chapter 3 3.1 Introduction The various sections

More information

Verilog HDL. Design Examples

Verilog HDL. Design Examples Verilog HDL Design Examples Verilog HDL Design Examples Joseph Cavanagh Boca Raton London New York CRC Press is an imprint of the Taylor & Francis Group, an informa business CRC Press Taylor & Francis

More information

Verilog for Combinational Circuits

Verilog for Combinational Circuits Verilog for Combinational Circuits Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2014 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/

More information