Exclusive OR/Exclusive NOR (XOR/XNOR)

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Exclusive OR/Exclusive NOR (XOR/XNOR)"

Transcription

1 Exclusive OR/Exclusive NOR (XOR/XNOR) XOR and XNOR are useful logic functions. Both have two or more inputs. The truth table for two inputs is shown at right. a XOR b = 1 if and only if (iff) a b. a XNOR b = 1 if and only if (iff) a = b. Both may also have many inputs. For >2 inputs, the XOR output is 1 for an odd number of 1 inputs; XNOR has a 1 output for an even number of 1 inputs. Symbols are shown below and to the right. a b XOR a b Like NAND and NOR, XOR and XNOR are not a basic Boolean functions, XNOR a b but can be made from b AND, OR and NOT. 1 Lecture #6: More Complex Combinational Logic Circuits XOR/XNOR Truth Table a b a XOR b a XNOR b XNOR = ab + ab XOR = ab + ab

2 Quick Simplification Review The first technique we studied to simplify a Boolean expression used algebraic techniques. For instance, consider the truth table at right. The minterms shown represent the SOP expression: f = abc + abc + abc The Boolean expression is easily simplifiable using the Boolean identities: f = abc + abc + abc f = abc + abc + abc + abc 1 1 f = ab( c + c) + ac( b + b) f = ab + ac The simplified circuit is shown below the truth table. a b c f Lecture #6: More Complex Combinational Logic Circuits

3 Quick Simplification Review (2) We can also plot the minterms on a K-map and graphically simplify the expression (and the circuit). On the K-map below, the three minterms ( abc, abc, abc) are plotted. The simplified expression derived from the two prime implicants is the same as that using algebraic simplification. a a bc bc bc bc Identical circuit solution using K-map method: f = ab + ac a b c f Lecture #6: More Complex Combinational Logic Circuits

4 4 Lecture #6: More Complex Combinational Logic Circuits Exercise 1 Let s do another simplification exercise before moving on. Consider this spec: The function f of three variables, x, y, and z, is 1 when x and y are both 1 or when x and z are both 1. Find the SOP expression, the simplified expression, and the simplified circuit. Use the K-map on the next slide to perform the same simplification. x y z f

5 x x yz K-Map Solution yz yz yz 5 Lecture #6: More Complex Combinational Logic Circuits

6 Decoders An n-to-2 n decoder is a combinational logic circuit that has n inputs and up to 2 n outputs. That is, it can have 2 n outputs, but it may have less. Each output of a decoder will normally be true (i.e., go to logic 1) for only one combination of the n inputs. Consider the case of an n = 2 decoder. The decoder will have 2 inputs and up to 2 n = 2 2 = 4 outputs. Assume that the decoder has the maximum possible number of outputs (4). Then the truth table for the 2-input decoder will show that for each combination of y and x (00, 01, 10, 11), one of the outputs will go high (logic 1). Let us call the inputs y and x and the outputs a, b, c, and d (here, x is the more significant bit). Then let us define a = 1 for x = 0, y = 0; b = 1 for x = 0 and y = 1; c = 1 for x = 1 and y = 0, and d = 1 for x = 1 and y = 1. 6 Lecture #6: More Complex Combinational Logic Circuits

7 Decoders (2) The truth tables for a-d in our 2-to-4 decoder are: x y * a b c d Using the truth tables above, we can define a-d in terms of x and y. a= xy b c d = xy = xy = xy Boolean expressions for a, b, c, and d in terms of x and y. * Note that we put x first because we regard the xy pair as a number, with x the more significant bit. 7 Lecture #6: More Complex Combinational Logic Circuits

8 Decoders (3) Remembering that a = x y, b = xy, c = x y, and = xy : If we consider xy a binary number with x the MSB and y the LSB, then a-d represent a x true condition for each of the four possible y binary numbers that x and y can represent. Thus we say that each output a-d has an address, which is a unique combination of the two bits in the binary number yx: For xy = 00, a = 1; for xy = 01, b = 1; for xy = 10, c = 1; for xy = 11, d = 1. a b c d Based on the logic expressions above, we can draw the decoder circuit as shown at right. 8 Lecture #6: More Complex Combinational Logic Circuits

9 Decoders (4) In the same way, a decoder with 3 inputs may have up to 2 3 = 8 outputs, and each output will have a unique address that represents one of the eight possible combinations of the three inputs. Such a circuit is shown to the right. In the same way, a 4-input decoder could have up to 2 4 = 16 outputs, each of which is a unique combination of the inputs. Etc., for 5, 6, 7 Two Notes: Any n-input decoder can have up to 2 n outputs, but it may have less. In general, each output for an n-input decoder is created by a single n-input AND gate. Its inputs are the n decoder inputs, some of which may be inverted. 9 Lecture #6: More Complex Combinational Logic Circuits x y z 3-input, eightoutput decoder x y z g a b c d e f g h

10 Definition of a Multiplexer A multiplexer is a combinational logic circuit that has up to 2 n inputs, an n-bit address, and one output. The multiplexer connects one of the inputs to the output, depending on the value of the n-bit address. The n-bit address is decoded, just as we have studied in the last five slides. Thus the multiplexer uses a decoder and a selector circuit (which we will see in a subsequent slide) to tie one of its inputs to its output. The multiplexer is usually symbolized by the abbreviation MUX as the symbol for its function. 10 Lecture #6: More Complex Combinational Logic Circuits

11 Multiplexer: An Input to Output Selector The truth table for a multiplexer is shown below. Assume a 4-input MUX, with inputs labeled a, b, c, d. Then there must be two address lines, x (MSB) and y (LSB). The output is denoted as f. x y f 0 0 a 0 1 b 1 0 c 1 1 d 11 Lecture #6: More Complex Combinational Logic Circuits

12 Components of a Multiplexer a b c f d Output* x y Selector * Note that the multiplexer has a 1-bit output. Decoder The multiplexer is shown above, with the various parts of the circuit labeled. 12 Lecture #6: More Complex Combinational Logic Circuits

13 Differences in Decoder and Multiplexer Decoder: A decoder has n inputs, which are called the address. A decoder has up to 2 n outputs (it can have that many, maximum; but it might have less). Each output line is true (or 1) for a specific combinations of the input lines, called the address. Multiplexer: A multiplexer has two sets of inputs: n address lines (just like the decoder) and as many as 2 n inputs, one of which is selected by each address for output (it may have less inputs). A multiplexer has only one output. The output is the value of the input selected by the address. Thus we see that a decoder makes up a part of a multiplexer. 13 Lecture #6: More Complex Combinational Logic Circuits

14 Let s design a simple decoder and multiplexer. A decoder has a three-input address, x-z, with x = MSB, but although it may have up to 2 3, or 8 outputs, in this case, it has only three. Output 1 is true on address 3, 2 on address 6, and 3 on address 7. Design the decoder. Now using the decoder and adding a selector circuit, design a MUX to output the inputs a-c on addresses 3, 6, and 7, respectively. Exercise 2 14 Lecture #6: More Complex Combinational Logic Circuits

15 Binary Arithmetic Circuits A binary adder is a large part of a computer central processor unit (CPU). The CPU figuring unit is sometimes called the ALU, or arithmetic/logic unit, (Patterson and Hennessey call it the datapath ). The ALU or datapath is a combinational logic unit that can add, subtract, or do logical operations such as AND, OR, NOT, etc. Consider the rules of addition (adding two numbers only*): Numbers are added on a columnar basis, starting on the right. If the sum of one column is a 2-digit number, the right number goes in current column, and the left number (always a 1) becomes a carry to the next column to the left. Column addition always includes the carry from the column to the right. The resulting sum in any column will be only a single digit. * A computer never adds but two numbers together at one time. 15 Lecture #6: More Complex Combinational Logic Circuits

16 Principles of Addition Decimal addition example: Carries Binary numbers are added in exactly the same way: Carries Lecture #6: More Complex Combinational Logic Circuits (1) Basic principles for an n-column addition: Add column i plus carry from column i 1 (c i 1 ). If a one-digit result, that number is the sum of column i, s i. If a 2-digit result, the right digit is s i. The left digit is carry i, or c i. The column i carry, c i, will be added to column (i+1).

17 A Half-Adder Circuit We would now like to design a digital adder for two binary numbers. Since addition is done on a columnar basis, all that is necessary to add two n- bit numbers, is to use one binary column adder for each of the n bits. Thus, to add two 8-bit numbers, we simply use eight column adders. First we consider a 2-bit half-adder. The truth table on the right shows sum and carry bits for the 2 input bits a & b. Thus, sum is the simple SOP expression: S = ab + ab. Likewise, carry out is defined as: Co = ab The SOP representation of the 2-bit half adder is at the right. a b S c o S Exp c o Exp a b ab ab Half-Adder Circuit ab S C o 17 Lecture #6: More Complex Combinational Logic Circuits

18 Alternate Construction of a Half-Adder We note that in a half-adder, the sum s is expressed as: s = ab + ab As noted on the first slide today, this is the expression for the XOR gate. Thus an alternate expression for s is: s= a b Note that carry out is still: Co = ab. We can then construct the logic gate equivalent of the half-adder as shown on the right. Note that this is no longer a standard SOP representation, but it is easier to build! 18 Lecture #6: More Complex Combinational Logic Circuits

19 Half-Adder in Action = 0, =1 19 Lecture #6: More Complex Combinational Logic Circuits

20 The Full Adder The half-adder circuit is an important step in building a digital adder, but it is not the total solution to the binary addition problem. When adding binary numbers on a columnar basis, in addition to the column bits, a i and b i, there is also the possibility of a carry bit, c i-1 from the column to the right. Thus the 2-bit column adder must be a 3-bit adder. This 3-bit adder is called a full adder. In adding two n-bit binary numbers, the rightmost bits of the two numbers of two numbers could be added with a half-adder (no carry in). However, most adder circuits use all fulladders, since carry-in for the least significant bit can be useful; we will see that use later in this lecture. Col (i+1) Col (i) Col (i 1) (c i ) + a i+1 + b i+1 s i+1 (c i 1 ) + a i + b i s i (c i 2 ) + a i 1 + b i 1 s i 1 Columnar Addition 20 Lecture #6: More Complex Combinational Logic Circuits

21 21 Lecture #6: More Complex Combinational Logic Circuits Full Adder Boolean Equations The full column adder truth table is shown, along with SOP terms for the 1 s in the S and c o columns. For the sum SOP function:* S = abc + abc + abc + abc For the carry out SOP function: Co = abc + abc + abc + abc The SOP circuit for the full adder is shown on the next slide. a b c i S c o S Exp c o Exp abc * abc abc abc abc abc abc abc * For simplicity, we represent carry in above simply as c.

22 SOP Circuit for a Full Adder Above is the SOP equivalent circuit for a full adder. Note that sum and carry have a common term. 22 Lecture #6: More Complex Combinational Logic Circuits

23 Alternate Construction of Full Adder We note that since we can construct a full-adder similarly to a halfadder, then we should be able to use the alternate half-adder (XOR logic) to construct a full adder. That is, for the full adder, S = ( a b) c Co = ab + ( a b) c Where c = c in The equivalent logic construction is shown in the circuit on the right. The exact proof is left to the student. Although this is an easier circuit to build (XOR s simplify the circuit), it is NOT in correct SOP or POS form. 23 Lecture #6: More Complex Combinational Logic Circuits

24 32-Bit Adder 1-digit (2-bit) full adder 32-digit (2-bit) adder May be a half-adder A 32-bit adder would be made up like this: The 32 1-digit full adders would be wired up so that each would add one column of two 32-bit numbers (a half-adder could be used in column 1). 24 Lecture #6: More Complex Combinational Logic Circuits

25 Subtraction In the past, digital subtractors were constructed as well as digital adders. However, it quickly became apparent that the subtraction function could be added very easily to a digital adder. Consider the following: A 1-bit full adder produces carry out (c O ) and sum (s) outputs from carry in (c i ) and numerical (a and b) inputs. We note that ( a b) = a+ ( b, so that we can 2's complement ) = a+ b+ 1 subtract using an adder if we: Invert b (can obtain via an XOR). Set the carry in input (c i ) of bit 0 to 1 (which is why we would need a full adder even in column 1 of the binary adder circuit). To select subtraction, we need two control signals: Invert b which selects b instead of b. Carry in, column 1 which sets c i = 1 for bit 0. We can combine these into one control signal, Add /Sub+ 25 Lecture #6: More Complex Combinational Logic Circuits

26 If the Add /Sub+ input is high, the XOR s invert the B input, while if it is low, the B input is not changed. Inputs Add/Subtract Selector 26 Lecture #6: More Complex Combinational Logic Circuits Four-Bit Binary Add/Subtract Circuit Carry in = 1 for subtract. A0 A1 A2 A3 B0 B1 B2 B3 Add-/Sub+ A B A B A B A B Ci Ci Ci Ci C0 C1 C2 1-Bit Full Adder (Used 4 Times) S0 S1 S2 S3 C3 Outputs Note that the Add /Sub+ line must be XOR ed with the C3 line to be correct for the subtract case. 4-Bit Adder Section

27 The ALU or Datapath We have already noted that the arithmetic/logical unit (ALU, or what P&H call the datapath ) is the calculating unit of the computer central processor. The amazing thing about the ALU is that it is mostly combinational logic composed of the very logic functions that we have studied so far! Patterson & Hennessy discuss a simple version ALU in Chapter 4 of their book that only functions as an AND/OR/add/subtract/compare unit. This ALU takes the columnar approach we have discussed for a binary adder. Their 32-bit ALU (the prototype for the MIPS R2000 computer we will learn to program later on) is composed of 32 of the 1-bit ALUs. 27 Lecture #6: More Complex Combinational Logic Circuits

28 A 1-Bit ALU 2-Bit MUX Select Address a OR b Carry In 1-bit Full Adder/ Subtractor AND Sum Carry/ Borrow 4-to-1 MUX 1-Bit Result Out The 1-bit ALU provides all the possible results of logic/arithmetical analysis to the 4-1 MUX. The 2-bit select address (derived from decoding a part of the computer instruction) selects the desired result and outputs it. For instance, outputting the borrow signal provides a comparison of a and b. 28 Lecture #6: More Complex Combinational Logic Circuits

29 Bit Slicing: N 1-bit ALU s = N-Bit Processor Thirty-two of the one-bit ALU s shown on the previous page may be combined to form a 32-bit MIPS CPU (which we will study later). In the 32-bit ALU, an operation is performed on all bits at once using the 32 separate 1-bit ALU s. This slices the data into 32 bits, which is where the name bit slicing comes from. This approach works well for AND and OR functions. For add and subtract, we have to propagate carries from each lower column to the next higher column. This means that in a 32-bit computer, we have 32 carries (the 32 nd carry would be overflow ). All these carries/borrows are VERY time-consuming, and so some special digital fast carry circuits have been developed to accelerate the carry/borrow action (they are not shown on the 1-bit ALU diagram). These accelerators are not covered in EE Lecture #6: More Complex Combinational Logic Circuits

30 Exercise 3 As a special exercise in reviewing the digital adder plus some of the principles we learned earlier, consider the following: The SOP Boolean expression for a full adder carry out is: C = abc + abc + abc + abc, where c = c o This expression can be simplified to three terms. Do so. Then show the circuit design. i 30 Lecture #6: More Complex Combinational Logic Circuits

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

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

Tutorial 5 Special Combinational Logic Circuit

Tutorial 5 Special Combinational Logic Circuit Tutorial 5 Special Combinational Logic Circuit Question 1 a) What is the function of an adder circuit? b) A half-adder adds two binary bits, true or false? c) A half-adder has a sum output only, true or

More information

Logic and Computer Design Fundamentals Adders and Multiplication

Logic and Computer Design Fundamentals Adders and Multiplication Logic and Computer Design Fundamentals Adders and Multiplication 24 Pearson Education, Inc. Overview Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead

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

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction

More information

EE 110 Practice Problems for Exam 2: Solutions, Fall 2008

EE 110 Practice Problems for Exam 2: Solutions, Fall 2008 EE 110 Practice Problems for Exam 2: Solutions, Fall 2008 1. Circle T (true) or F (false) for each of these Boolean equations. (a). T FO An 8-to-1 multiplexer requires 2 select lines. (An 8-to-1 multiplexer

More information

Digital Logic and Design (EEE-241) Lecture

Digital Logic and Design (EEE-241) Lecture Digital Logic and Design (EEE-241) Lecture Dr. M. G. Abbas Malik abbas.malik@ciitlahore.edu.pk edu Picture Source: http://www.vanoast.com/old-portfolio/digital-design-logo-one%5ba%5d.jpg Previous lecture

More information

Understanding Logic Design

Understanding Logic Design Understanding Logic Design ppendix of your Textbook does not have the needed background information. This document supplements it. When you write add DD R0, R1, R2, you imagine something like this: R1

More information

Gates, Circuits, and Boolean Algebra

Gates, Circuits, and Boolean Algebra Gates, Circuits, and Boolean Algebra Computers and Electricity A gate is a device that performs a basic operation on electrical signals Gates are combined into circuits to perform more complicated tasks

More information

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas Take-Home Exercise Assume you want the counter below to count mod-6 backward. That is, it would count 0-5-4-3-2-1-0, etc. Assume it is reset on startup, and design the wiring to make the counter count

More information

Experiment 5. Arithmetic Logic Unit (ALU)

Experiment 5. Arithmetic Logic Unit (ALU) Experiment 5 Arithmetic Logic Unit (ALU) Objectives: To implement and test the circuits which constitute the arithmetic logic circuit (ALU). Background Information: The basic blocks of a computer are central

More information

CS61c: Representations of Combinational Logic Circuits

CS61c: Representations of Combinational Logic Circuits CS61c: Representations of Combinational Logic Circuits J. Wawrzynek October 12, 2007 1 Introduction In the previous lecture we looked at the internal details of registers. We found that every register,

More information

Chapter 4. Combinational Logic. Outline. ! Combinational Circuits. ! Analysis and Design Procedures. ! Binary Adders. ! Other Arithmetic Circuits

Chapter 4. Combinational Logic. Outline. ! Combinational Circuits. ! Analysis and Design Procedures. ! Binary Adders. ! Other Arithmetic Circuits Chapter 4 Combinational Logic 4- Outline! Combinational Circuits! Analysis and Design Procedures! Binary Adders! Other Arithmetic Circuits! Decoders and Encoders! Multiplexers 4-2 Combinational v.s Sequential

More information

Chapter 4 Combinational Logic

Chapter 4 Combinational Logic Chapter 4 Combinational Logic Chih-Tsun Huang ( 黃稚存 ) Department of Computer Science National Tsing Hua University Outline Introduction Combinational Circuits Analysis Procedure Design Procedure Binary

More information

3.1 Combinational Circuits

3.1 Combinational Circuits EED2003 Digital Design Presentation 3: Combinational Logic Design Asst. Prof.Dr. Ahmet ÖZKURT Asst. Prof.Dr Hakkı T. YALAZAN Based on the Notes byjaeyoung Choi Fall 2000 3.1 Combinational Circuits logic

More information

Chapter 4 Combinational Logic

Chapter 4 Combinational Logic 1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates, and output variables. 2 4-2. Analysis

More information

l What have discussed up until now & why: l C Programming language l More low-level then Java. l Better idea about what s really going on.

l What have discussed up until now & why: l C Programming language l More low-level then Java. l Better idea about what s really going on. CS211 Computer Architecture l Topics Digital Logic l Transistors (Design & Types) l Logic Gates l Combinational Circuits l K-Maps Class Checkpoint l What have discussed up until now & why: l C Programming

More information

Chapter 6 Digital Arithmetic: Operations & Circuits

Chapter 6 Digital Arithmetic: Operations & Circuits Chapter 6 Digital Arithmetic: Operations & Circuits Chapter 6 Objectives Selected areas covered in this chapter: Binary addition, subtraction, multiplication, division. Differences between binary addition

More information

Fundamentals of Computer Systems

Fundamentals of Computer Systems Fundamentals of Computer Systems Combinational Logic Martha A. Kim Columbia University Fall 23 / Combinational Circuits Combinational circuits are stateless. Their output is a function only of the current

More information

4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION

4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION 4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION BOOLEAN OPERATIONS AND EXPRESSIONS Variable, complement, and literal are terms used in Boolean algebra. A variable is a symbol used to represent a logical quantity.

More information

Simplifying Logic Circuits with Karnaugh Maps

Simplifying Logic Circuits with Karnaugh Maps Simplifying Logic Circuits with Karnaugh Maps The circuit at the top right is the logic equivalent of the Boolean expression: f = abc + abc + abc Now, as we have seen, this expression can be simplified

More information

Combinational logic design case studies

Combinational logic design case studies Combinational logic design case studies General design procedure Case studies CD to 7-segment display controller logical function unit process line controller calendar subsystem rithmetic circuits integer

More information

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING Lab Manual Digital Electronics Laboratory (EC-39) BACHELOR OF TECHNOLOGY Subject Code: EC 39 Subject Name: Digital Electronics Laboratory Teaching

More information

Sistemas Digitais I LESI - 2º ano

Sistemas Digitais I LESI - 2º ano Sistemas Digitais I LESI - 2º ano Lesson 6 - Combinational Design Practices Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA - PLDs (1) - The

More information

Computer Organization I. Lecture 8: Boolean Algebra and Circuit Optimization

Computer Organization I. Lecture 8: Boolean Algebra and Circuit Optimization Computer Organization I Lecture 8: Boolean Algebra and Circuit Optimization Overview The simplification from SOM to SOP and their circuit implementation Basics of Logic Circuit Optimization: Cost Criteria

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh. Philadelphia University Faculty of Information Technology Department of Computer Science Computer Logic Design By Dareen Hamoudeh Dareen Hamoudeh 1 An integrated circuit (also referred to as an IC, a chip,

More information

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots Registers As you probably know (if you don t then you should consider changing your course), data processing is usually

More information

Design of the ALU Adder, Logic, and the Control Unit

Design of the ALU Adder, Logic, and the Control Unit Design of the ALU Adder, Logic, and the Control Unit This lecture will finish our look at the CPU and ALU of the computer. Remember: 1. The ALU performs the arithmetic and logic operations. 2. The control

More information

CHAPTER 3 Boolean Algebra and Digital Logic

CHAPTER 3 Boolean Algebra and Digital Logic CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4

More information

1.10 (a) Effects of logic gates AND, OR, NOT on binary signals in a processor

1.10 (a) Effects of logic gates AND, OR, NOT on binary signals in a processor Chapter 1.10 Logic Gates 1.10 (a) Effects of logic gates AND, OR, NOT on binary signals in a processor Microprocessors are the central hardware that runs computers. There are several components that make

More information

Conversion between number systems:

Conversion between number systems: Conversion between number systems: Radix-r to decimal. Decimal to binary. Decimal to Radix-r Binary to Octal Binary to Hex Binary arithmetic operations. Negative number representations. Switching Algebra

More information

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one

More information

Digital Logic: Boolean Algebra and Gates

Digital Logic: Boolean Algebra and Gates Digital Logic: Boolean Algebra and Gates Textbook Chapter 3 CMPE2 Summer 28 Basic Logic Gates CMPE2 Summer 28 Slides by ADB 2 Truth Table The most basic representation of a logic function Lists the output

More information

DEPARTMENT OF INFORMATION TECHNLOGY

DEPARTMENT OF INFORMATION TECHNLOGY DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012 Karnaugh Maps & Combinational Logic Design ECE 52A Winter 22 Reading Assignment Brown and Vranesic 4 Optimized Implementation of Logic Functions 4. Karnaugh Map 4.2 Strategy for Minimization 4.2. Terminology

More information

The equation for the 3-input XOR gate is derived as follows

The equation for the 3-input XOR gate is derived as follows The equation for the 3-input XOR gate is derived as follows The last four product terms in the above derivation are the four 1-minterms in the 3-input XOR truth table. For 3 or more inputs, the XOR gate

More information

Chapter 4. Gates and Circuits. Chapter Goals. Chapter Goals. Computers and Electricity. Computers and Electricity. Gates

Chapter 4. Gates and Circuits. Chapter Goals. Chapter Goals. Computers and Electricity. Computers and Electricity. Gates Chapter Goals Chapter 4 Gates and Circuits Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors Combine basic gates into circuits Describe the

More information

Combinational Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Combinational Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science Combinational Logic Rab Nawaz Khan Jadoon DCS COMSATS Institute of Information Technology Lecturer COMSATS Lahore Pakistan Digital Logic and Computer Design Combinational logic Design Procedures Starts

More information

The Storage or Data Register

The Storage or Data Register The Storage or Data Register All sequential logic circuits in the computer CPU are based on the latch or flip-flop. A significant part of the ALU is the register complement. In the MIPS R-2000 computer

More information

Combinational Logic Design

Combinational Logic Design Chapter 4 Combinational Logic Design The foundations for the design of digital logic circuits were established in the preceding chapters. The elements of Boolean algebra (two-element switching algebra

More information

8-bit 4-to-1 Line Multiplexer

8-bit 4-to-1 Line Multiplexer Project Part I 8-bit 4-to-1 Line Multiplexer Specification: This section of the project outlines the design of a 4-to-1 multiplexor which takes two 8-bit buses as inputs and produces a single 8-bit bus

More information

FORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. Lab 2. The Full-Adder

FORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. Lab 2. The Full-Adder FORDHAM UNIVERSITY CISC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. Science Spring, 2011 Lab 2 The Full-Adder 1 Introduction In this lab, the student will construct

More information

Binary Adder. sum of 2 binary numbers can be larger than either number need a carry-out to store the overflow

Binary Adder. sum of 2 binary numbers can be larger than either number need a carry-out to store the overflow Binary Addition single bit addition Binary Adder sum of 2 binary numbers can be larger than either number need a carry-out to store the overflow Half-Adder 2 inputs (x and y) and 2 outputs (sum and carry)

More information

3.Basic Gate Combinations

3.Basic Gate Combinations 3.Basic Gate Combinations 3.1 TTL NAND Gate In logic circuits transistors play the role of switches. For those in the TTL gate the conducting state (on) occurs when the baseemmiter signal is high, and

More information

BOOLEAN ALGEBRA & LOGIC GATES

BOOLEAN ALGEBRA & LOGIC GATES BOOLEAN ALGEBRA & LOGIC GATES Logic gates are electronic circuits that can be used to implement the most elementary logic expressions, also known as Boolean expressions. The logic gate is the most basic

More information

COMBINATIONAL CIRCUITS

COMBINATIONAL CIRCUITS COMBINATIONAL CIRCUITS http://www.tutorialspoint.com/computer_logical_organization/combinational_circuits.htm Copyright tutorialspoint.com Combinational circuit is a circuit in which we combine the different

More information

4 Combinational Components

4 Combinational Components Chapter 4 Combinational Components Page of 8 4 Combinational Components In constructing large digital circuits, instead of starting with the basic gates as building blocks, we often start with larger building

More information

Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C.

Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C. Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C.6 Goals for today Binary (Arithmetic) Operations One-bit and four-bit

More information

Review of Gates in Digital Electronics

Review of Gates in Digital Electronics pp. 22-26 Krishi Sanskriti Publications http://www.krishisanskriti.org/areee.html Review of Gates in Digital Electronics Divya Aggarwal Student, Department of Physics, University of Delhi Abstract: Digital

More information

Reading and construction of logic gates

Reading and construction of logic gates Reading and construction of logic gates A Boolean function is an expression formed with binary variables, a binary variable can take a value of 1 or 0. Boolean function may be represented as an algebraic

More information

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation Karnaugh Maps Applications of Boolean logic to circuit design The basic Boolean operations are AND, OR and NOT These operations can be combined to form complex expressions, which can also be directly translated

More information

Chapter 3: Combinational Logic Design

Chapter 3: Combinational Logic Design Chapter 3: Combinational Logic Design 1 Introduction We have learned all the prerequisite material: Truth tables and Boolean expressions describe functions Expressions can be converted into hardware circuits

More information

FORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. The Binary Adder

FORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. The Binary Adder FORDHAM UNIVERITY CIC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. cience pring, 2011 1 Introduction The Binar Adder The binar adder circuit is an important building

More information

Ripple Carry and Carry Lookahead Adders

Ripple Carry and Carry Lookahead Adders Ripple Carry and Carry Lookahead Adders 1 Objectives Design ripple carry and carry lookahead (CLA) adders. Use VHDL CAD tools. Use hierarchical design techniques. Model and simulate combinational logic

More information

2 Boolean Arithmetic. Counting is the religion of this generation, its hope and salvation. Gertrude Stein ( )

2 Boolean Arithmetic. Counting is the religion of this generation, its hope and salvation. Gertrude Stein ( ) 2 Boolean Arithmetic Counting is the religion of this generation, its hope and salvation. Gertrude Stein (1874 1946) In this chapter we build gate logic designs that represent numbers and perform arithmetic

More information

6. Combinational Circuits. Building Blocks. Digital Circuits. Wires. Q. What is a digital system? A. Digital: signals are 0 or 1.

6. Combinational Circuits. Building Blocks. Digital Circuits. Wires. Q. What is a digital system? A. Digital: signals are 0 or 1. Digital Circuits 6 Combinational Circuits Q What is a digital system? A Digital: signals are or analog: signals vary continuously Q Why digital systems? A Accurate, reliable, fast, cheap Basic abstractions

More information

Name: Date: To investigate the operation of a Multiplexer (MUX) circuit. To investigate the operation of a 4-bit magnitude comparator circuit.

Name: Date: To investigate the operation of a Multiplexer (MUX) circuit. To investigate the operation of a 4-bit magnitude comparator circuit. Richland College Engineering Technology Rev. B. Donham Rev. (7/23) J. Horne Rev. 2 (/28) J. Bradbury Digital Fundamentals CETT 425 Lab 9 MSI Logic - Decoder / Encoder / MUX / Comparator Name: Date: Objectives:

More information

Computer Science. 19. Combinational Circuits. Computer Science. Building blocks Boolean algebra Digital circuits Adder circuit. Arithmetic/logic unit

Computer Science. 19. Combinational Circuits. Computer Science. Building blocks Boolean algebra Digital circuits Adder circuit. Arithmetic/logic unit PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y Computer Science 9. Combinational Circuits Computer Science 9.

More information

A Little Perspective Combinational Logic Circuits

A Little Perspective Combinational Logic Circuits A Little Perspective Combinational Logic Circuits COMP 251 Computer Organization and Architecture Fall 2009 Motivating Example Recall our machine s architecture: A Simple ALU Consider an ALU that can perform

More information

TUTORIAL 1: Overview of a Digital Logic

TUTORIAL 1: Overview of a Digital Logic Questions 3 TUTORIAL : Overview of a Digital Logic. Fill in the terms for the definition. Term Definition i) Being continuous or having continuous values. ii) iii) iv) v) vi) A basic logic operation in

More information

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1 United States Naval Academy Electrical and Computer Engineering Department EC262 Exam 29 September 2. Do a page check now. You should have pages (cover & questions). 2. Read all problems in their entirety.

More information

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 5. Combinational & Sequential Circuits

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 5. Combinational & Sequential Circuits SAMPLE OF THE STUD MATERIAL PART OF CHAPTER 5 5. Introduction Digital circuits can be classified into two types: Combinational digital circuits and Sequential digital circuits. 5.2 Combinational Digital

More information

Design with Multiplexers

Design with Multiplexers Design with Multiplexers Consider the following design, taken from the 5 th edition of my textbook. This is a correct implementation of the Carry Out of a Full Adder. In terms of Boolean expressions, this

More information

UNIT - II LOGIC GATES AND GATES CLASSIFICATION

UNIT - II LOGIC GATES AND GATES CLASSIFICATION UNIT - II Logic Gates: Gates Classifications: Basic Gates (AND, OR, NOT), Universal Gates (NAND, NOR), Exclusive Gates (XOR, XNOR)(except circuit diagram) Logic Symbols, Logic Operators, Logical expression

More information

5 Combinatorial Components. 5.0 Full adder. Full subtractor

5 Combinatorial Components. 5.0 Full adder. Full subtractor 5 Combatorial Components Use for data transformation, manipulation, terconnection, and for control: arithmetic operations - addition, subtraction, multiplication and division. logic operations - AND, OR,

More information

Chapter 4. Combinational Logic

Chapter 4. Combinational Logic Chapter 4 Combinational Logic Combinational Circuits Logic circuits for digital systems may be combinational or sequential. Combinational logic circuits consist of logic gates outputs = present combination

More information

Combinational circuit. Fig. 4-1 Block Diagram of Combinational Circuit Prentice Hall, Inc. M. Morris Mano DIGITAL DESIGN, 3e.

Combinational circuit. Fig. 4-1 Block Diagram of Combinational Circuit Prentice Hall, Inc. M. Morris Mano DIGITAL DESIGN, 3e. n inputs ombinational circuit m outputs Fig. 4- Block Diagram of ombinational ircuit 22 Prentice Hall, Inc. A B T 2 F A B T T 3 F 2 A B A F 2 B Fig. 4-2 Logic Diagram for Analysis Example 22 Prentice Hall,

More information

Comp 150 Booleans and Digital Logic

Comp 150 Booleans and Digital Logic Comp 150 Booleans and Digital Logic Recall the bool date type in Python has the two literals True and False and the three operations: not, and, or. The operations are defined by truth tables (see page

More information

CSE140: Components and Design Techniques for Digital Systems

CSE140: Components and Design Techniques for Digital Systems CSE4: Components and Design Techniques for Digital Systems Tajana Simunic Rosing What we covered thus far: Number representations Logic gates Boolean algebra Introduction to CMOS HW#2 due, HW#3 assigned

More information

Department of Computer Science & Technology o14

Department of Computer Science & Technology o14 Department of Computer Science & Technology 23-2o4 64- Digital Electronics Unit : Codes Short Question Define signal. List out the advantages of using digital circuitry. What do you mean by radix of the

More information

Combinational circuits

Combinational circuits Combinational circuits Combinational circuits are stateless The outputs are functions only of the inputs Inputs Combinational circuit Outputs 3 Thursday, September 2, 3 Enabler Circuit (High-level view)

More information

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576 exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576 Outline exclusive OR gate (XOR) Definition Properties Examples of Applications Odd Function Parity Generation and Checking

More information

Combinational Logic. Combinational Circuits in Computers (Examples) Design of Combinational Circuits. CC Design Example

Combinational Logic. Combinational Circuits in Computers (Examples) Design of Combinational Circuits. CC Design Example Combinational Circuits in Computers (Examples) Combinational Logic Translates a set of Boolean n input variables ( or ) by a mapping function (using Boolean operations) to produce a set of Boolean m output

More information

Combinational Logic Building Blocks and Bus Structure

Combinational Logic Building Blocks and Bus Structure Combinational Logic Building Blocks and Bus Structure ECE 5A Winter 0 Reading Assignment Brown and Vranesic Implementation Technology.8 Practical Aspects.8.7 Passing s and 0s Through Transistor Switches.8.8

More information

UNIT I NUMBER SYSTEM AND BINARY CODES

UNIT I NUMBER SYSTEM AND BINARY CODES 1 UNIT I NUMBER SYSTEM AND BINARY CODES 1.0 Aims and Objectives 1.1 Introduction 1.2 Number System 1.2.1 Decimal Number System 1.2.2 Bi-stable Devices 1.2.3 Binary Number System 1.2.4 Octal number System

More information

ORG ; ZERO. Introduction To Computing

ORG ; ZERO. Introduction To Computing Dec 0 Hex 0 Bin 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and

More information

Combinational Circuits (Part II) Notes

Combinational Circuits (Part II) Notes Combinational Circuits (Part II) Notes This part of combinational circuits consists of the class of circuits based on data transmission and code converters. These circuits are multiplexers, de multiplexers,

More information

Rita Lovassy. Digital Technics

Rita Lovassy. Digital Technics Rita Lovassy Digital Technics Kandó Kálmán Faculty of Electrical Engineering Óbuda University Budapest, 2013 Preface Digital circuits address the growing need for computer networking communications in

More information

2 Building Blocks. There is often the need to compare two binary values.

2 Building Blocks. There is often the need to compare two binary values. 2 Building Blocks 2.1 Comparators There is often the need to compare two binary values. This is done using a comparator. A comparator determines whether binary values A and B are: 1. A = B 2. A < B 3.

More information

Logic in Computer Science: Logic Gates

Logic in Computer Science: Logic Gates Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers

More information

Analog & Digital Electronics Course No: PH-218

Analog & Digital Electronics Course No: PH-218 Analog & Digital Electronics Course No: PH-218 Lec-29: Combinational Logic Modules Course Instructor: Dr. A. P. VAJPEYI Department of Physics, Indian Institute of Technology Guwahati, India 1 Combinational

More information

Basics of Digital Logic Design

Basics of Digital Logic Design CSE 675.2: Introduction to Computer Architecture Basics of Digital Logic Design Presentation D Study: B., B2, B.3 Slides by Gojko Babi From transistors to chips Chips from the bottom up: Basic building

More information

Chapter 4 Combinational Logic

Chapter 4 Combinational Logic EEA051 - Digital Logic 數位邏輯 Chapter 4 Combinational Logic 吳俊興國立高雄大學資訊工程學系 November 2005 Chapter 4 Combinational Logic 4-1 Combinational Circuits 4-2 Analysis Procedure 4-3 Design Procedure 4-4 Binary Adder-Subtractor

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 AND ARITHMETIC (THROUGH EXAMPLE) 1st (Autumn) term 2014/2015 COMBINATIONAL

More information

Gate-Level Minimization

Gate-Level Minimization Chapter 3 Gate-Level Minimization 3- Outline! Karnaugh Map Method! NAND and NOR Implementations! Other Two-Level Implementations! Exclusive-OR Function! Hardware Description Language 3-2 Why Logic Minimization?!

More information

Gates, Circuits and Boolean Functions

Gates, Circuits and Boolean Functions Lecture 2 Gates, Circuits and Boolean Functions DOC 112: Hardware Lecture 2 Slide 1 In this lecture we will: Introduce an electronic representation of Boolean operators called digital gates. Define a schematic

More information

Computer Systems Lab 1. Basic Logic Gates

Computer Systems Lab 1. Basic Logic Gates Computer Systems Lab Basic Logic Gates Object To investigate the properties of the various types of logic gates, and construct some useful combinations of these gates. Parts () 700 Quad -input NAND gate

More information

1. Realization of gates using Universal gates

1. Realization of gates using Universal gates 1. Realization of gates using Universal gates Aim: To realize all logic gates using NAND and NOR gates. Apparatus: S. No Description of Item Quantity 1. IC 7400 01 2. IC 7402 01 3. Digital Trainer Kit

More information

CSE 220: Systems Fundamentals I Unit 7: Logic Gates; Digital Logic Design: Boolean Equations and Algebra

CSE 220: Systems Fundamentals I Unit 7: Logic Gates; Digital Logic Design: Boolean Equations and Algebra CSE 220: Systems Fundamentals I Unit 7: Logic Gates; Digital Logic Design: Boolean Equations and Algebra Logic Gates Logic gatesare simple digital circuits that take one or more binary inputs and produce

More information

Combinational Logic Circuits

Combinational Logic Circuits CPSC 855 Embedded Systems Combinational Logic Circuits Fryad M. Rashid and Pei-Lin Chung Outline ² ² ² ² ² ² ² ² ² ² Design Combinational Logic Circuit for scenario Adder Subtractor Comparator Multiplexer

More information

Review of ECE 230 Material Prof. A. Mason, Michigan State University

Review of ECE 230 Material Prof. A. Mason, Michigan State University Review of ECE 230 Material Prof. A. Mason, Michigan State University Preface This document was developed for students taking ECE 331 to review material covered in ECE 230. It will be assumed that ECE 331

More information

Basics of Digital Logic Design

Basics of Digital Logic Design Basics of Digital Logic Design Dr. Arjan Durresi Louisiana State University Baton Rouge, LA 70810 Durresi@Csc.LSU.Edu LSUEd These slides are available at: http://www.csc.lsu.edu/~durresi/csc3501_07/ Louisiana

More information

ENEE 244 (01**). Spring 2006. Homework 4. Due back in class on Friday, April 7.

ENEE 244 (01**). Spring 2006. Homework 4. Due back in class on Friday, April 7. ENEE 244 (**). Spring 26 Homework 4 Due back in class on Friday, April 7.. Implement the following Boolean expression with exclusive-or and AND gates only: F = AB'CD' + A'BCD' + AB'C'D + A'BC'D. F = AB

More information

Boolean Algebra Part 1

Boolean Algebra Part 1 Boolean Algebra Part 1 Page 1 Boolean Algebra Objectives Understand Basic Boolean Algebra Relate Boolean Algebra to Logic Networks Prove Laws using Truth Tables Understand and Use First Basic Theorems

More information

2012-13 Department of Electronics & Communication

2012-13 Department of Electronics & Communication (A constituent college of Sri Siddhartha University) 2012-13 Department of Electronics & Communication LOGIC DESIGN LAB MANUAL III SEM BE Name : Sem :. Sec: Logic Design Lab Manual Contents Exp No Title

More information

ENEE244 (sec ) Spring Time alloted: 50 minutes. Student ID: Maximum score: 50 points

ENEE244 (sec ) Spring Time alloted: 50 minutes. Student ID: Maximum score: 50 points ENEE244 (sec -4) Spring 26 Midterm Examination II Pages: 7 printed sides Name: Answer key Time alloted: 5 minutes. Student ID: Maximum score: 5 points University rules dictate strict penalties for any

More information

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

Lecture 7: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture Points ddressed in this Lecture Lecture 7: 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