You are on page 1of 14

# ECE

## PREPARED BY, LAVANYA. M ECE

AIM: To provide an in-depth knowledge of the design of digital circuits and the use of Hardware Description Language in digital system design. OBJECTIVES : To understand different methods used for the simplification of Boolean functions To design and implement combinational circuits To design and implement synchronous sequential circuits To design and implement asynchronous sequential circuits To study the fundamentals of VHDL / Verilog HDL BOOLEAN ALGEBRA AND LOGIC GATES

UNIT I

Review of binary number systems - Binary arithmetic Binary codes Boolean algebra and theorems - Boolean functions Simplifications of Boolean functions using Karnaugh map and tabulation methods Implementation of Boolean functions using logic gates UNIT II COMBINATIONAL LOGIC

Combinational circuits Analysis and design procedures - Circuits for arithmetic operations Code conversion Introduction to Hardware Description Language (HDL) UNIT III DESIGN WITH MSI DEVICES

Decoders and encoders - Multiplexers and demultiplexers - Memory and programmable logic HDL for combinational circuits UNIT IV SYNCHRONOUS SEQUENTIAL LOGIC

Sequential circuits Flip flops Analysis and design procedures - State reduction and state assignment - Shift registers Counters HDL for Sequential Circuits. UNIT V ASYNCHRONOUS SEQUENTIAL LOGIC Analysis and design of asynchronous sequential circuits - Reduction of state and flow tables Race-free state assignment Hazards, ASM Chart. TEXT BOOKS 1. M.Morris Mano, Digital Design, 3rd edition, Pearson Education, 2007.REFERENCES 1. Charles H.Roth, Jr. Fundamentals of Logic Design, 4th Edition, Jaico Publishing House, Cengage Earning, 5th ed, 2005. 2. Donald D.Givone, Digital Principles and Design, Tata McGraw-Hill, 2007

BOOLEAN ALGEBRA AND LOGIC GATES INTRODUCTION: OBJECTIVES : To understand basic number systems and complements, and also number system conversion.

Review of binary number systems: The term digital refers to any process that is accomplished using discrete units Digital computer is the best example of a digital system.

Basically deal with two types of signals in electronics i) Analog ii) Digital

Types of Number Systems are i) Decimal Number system ii) Binary Number system iii) Octal Number system iv) Hexadecimal Number system Complements : Complements are used in digital computers for simplifying the subtraction operation and for logical manipulation. There are two types of complements i) rs complement ii) (r-1)s complement.

NUMBER SYSTEM FORMAT: Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F Oct 000 001 002 003 004 005 006 007 010 011 012 013 014 015 016 017 Bin 00000000 00000001 00000010 00000011 00000100 00000101 00000110 00000111 00001000 00001001 00001010 00001011 00001100 00001101 00001110 00001111

## Binary to decimal conversion: Step1: Assigning position to Binary number

Step 2: Draw lines, starting from the right, connecting each consecutive digit of the binary number to the power of two that is next in the list above it.

Step 3: Move through each digit of the binary number. If the digit is a 1, write its corresponding power of two below the line, under the digit. If the digit is a 0, write a 0 below the line, under the digit.

Step4: Add the numbers written below the line. The sum should be 155. This is the decimal equivalent of the binary number 10011011. Or, written with base subscripts:

Step5: Repetition of this method will result in memorization of the powers of two, which will allow you to skip step 1.

Binary to octal(vive versa): Every octal digit can be re-written as three binary bits and vice versa. octal binary octal binary octal binary octal 0 0 = 022+0210 000 4 4 = 122+0210

binary 100

1 2 3

5 6 7

## 101 110 111

Example: Convert 375 (octal) to binary 3/7/5 =011/111/101 binary Example: Convert 10110100 (binary) to octal 10 /110/100= 264 octal

Hexadecimal to octal conversion proceeds by first converting the hexadecimal digits to 4-bit binary values, then regrouping the binary bits into 3-bit octal digits. For example, to convert 3FA516: To binary: 3 F A 5 0011 1111 1010 0101 then to octal: 0 011 111 110 100 101 0 3 7 6 4 5

## Therefore, 3FA516 = 376458.

The conversion is made in two steps using binary as an intermediate base. Octal is converted to binary and then binary to hexadecimal, grouping digits by fours, which correspond each to a hexadecimal digit. For instance, convert octal 1057 to hexadecimal: To binary: 1 0 5 7 001 000 101 111 then to hexadecimal: 0010 0010 1111

Therefore, 10578 = 22F16. Binary to octal conversion The process is the reverse of the previous algorithm. The binary digits are grouped by threes, starting from the decimal point and proceeding to the left and to the right. Add leading 0s (or trailing zeros to the right of decimal point) to fill out the last group of three if necessary. Then replace each trio with the equivalent octal digit. For instance, convert binary 1010111100 to octal: 001 010 111 100 1 2 7 4

Therefore, 10101111002 = 12748. Convert binary 11100.01001 to octal: 011 100 . 010 010 3 4 . 2 2

## Octal to decimal conversion

To convert a number k to decimal, use the formula that defines its base-8 representation:

In this formula, ai is an individual octal digit being converted, where i is the position of the digit (counting from 0 for the right-most digit).

Example: Convert 7648 to decimal: 7648 = 782 + 681 + 480 = 448 + 48 + 4 = 50010

For double-digit octal numbers this method amounts to multiplying the lead digit by 8 and adding the second digit to get the total. Example: 658 = 68 + 5 = 5310 Binary to hexadecimal conversion: Conversion between hex and binary is easy. Simply substitute four-bit groups for the hex digit of the same value. Specifically: Hex Digit: 0 1 2 3 4 5 6 7 Bit Group: 0000 0001 0010 0011 0100 0101 0110 0111 Hex Digit: 8 9 a b c d e f Bit Group: 1000 1001 1010 1011 1100 1101 1110 1111 For conversion from hex to binary, simply string together the bits for each hex digit. For instance, 0x509d7a is binary 10100001001110101111010. To wit: Hex Number: 5 0 9 d 7 a Binary Number: 0101 0000 1001 1101 0111 1010 To convert the other way, break the binary number into groups of four, then replace each one with its hex digit. Group the digits starting from the right. If you don't have a complete group of four when you reach the left, pad with zero bits on the left to fill the last group. For instance, binary 111011011111110001 is 0x3b7f1: Binary Groups: 0011 1011 0111 1111 0001 Hex Digits: 3 b 7 f 1 Because this conversion is so easy, the easiest way to convert between binary and decimal is usually to go through hex. It generally requires fewer operations, Questions: 1.What is meant by radix? 2. What is the base of hexadecimal? 3.What is the use of Number syatem?

Boolean Algebra and Theorems Objective: To know about Boolean Basics and its uses in number system. Boolean algebra is a deductive mathematical system closed over the values zero and one (false and true). A binary operator defined over this set of values accepts a pair of boolean inputs and produces a single boolean value. For example, the boolean AND operatoraccepts two boolean inputs and produces a single boolean output (the logical AND ofthe two inputs).

Postulates: For any given algebra system, there are some initial assumptions, or postulates, that

the system follows. You can deduce additional rules, theorems, and other properties of the system from this basic set of postulates Closure: The boolean system is closed with respect to a binary operator if for every

pair of boolean values, it produces a boolean result. For example, logical AND is closed in the boolean system because it accepts only boolean operands and produces only boolean results.

## LAWS AND THEOREMS OF BOOLEAN ALGEBRA

Identity Operations with 0 and 1: 1. X + 0 = X (identity) 3. X + 1 = 1 (null element) Idempotency theorem: 5. X + X = X Complementarity: 7. X + X = 1 Involution theorem: 9. (X) = X Identities for multiple variables Cummutative law: 10. X + Y = Y + X Associative law: 12. (X + Y) + Z = X + (Y + Z) =X+Y+Z Distributive law: 14. X(Y + Z) = XY + XZ DeMorgans theorem: 16. (X + Y + Z + ...) = XYZ... or {f(X1,X2,...,Xn,0,1,+,.)} = {f(X1,X2,...,Xn,1,0,.,+)} Simplification theorems: 18. XY + XY = X (uniting) 20. X + XY = X (absorption) 22. (X + Y)Y = XY (adsorption) Consensus theorem: 24. XY + XZ + YZ = XY + XZ Duality: 26. (X + Y + Z + ...)D = XYZ... or {f(X1,X2,...,Xn,0,1,+,.)}D Dual 2. X.1 = X 4. X.0 = 0

6. X.X = X 8. X.X = 0

11. X.Y = Y X

## 17. (XYZ...) = X + Y + Z + ...

19. (X + Y)(X + Y) = X 21. X(X + Y) = X 23. XY + Y = X + Y 25. (X + Y)(X + Z)(Y + Z) = (X + Y)(X + Z) 27. (XYZ ...)D = X + Y + Z + ...

= f(X1,X2,...,Xn,1,0,.,+)

Demorgans law: A mathematician named DeMorgan developed a pair of important rules regarding group complementation in Boolean algebra. By group complementation, I'm referring to the complement of a group of terms, represented by a long bar over more than one variable.

(X + Y)' = X' . Y', These can be proved by the use of truth tables.

## Proof of (X + Y)' = X' . Y' X 0 0 1 1 X 0 0 1 1 Y 0 1 0 1 Y 0 1 0 1 X' 1 1 0 0 X+Y 0 1 1 1 Y' 1 0 1 0 (X+Y)' 1 0 0 0 X'.Y' 1 0 0 0

The two truth tables are identical, and so the two expressions are identical.

(X.Y) = X' + Y', These can be proved by the use of truth tables

X 0 0 1 1

Y 0 1 0 1

X.Y 0 0 0 1

(X.Y)' 1 1 1 0

## DeMorgans Laws are applicable for any number of variables.

Questions: 1. What is the use of Boolean function? 2. What is meant y Duality? 3. Why DEmorgans law is adopted for all variables.

Boolean function: A Boolean function describes how to determine a Boolean value output based on some logical calculation from Boolean inputs. Such functions play a basic role in questions of complexity theory as well as the design of circuits and chips for digital computers. K map: Objective: To know the method to simplify the Digital expression Introduction: A Karnaugh map provides a pictorial method of grouping together expressions with common factors and therefore eliminating unwanted variables. The Karnaugh map can also be described as a special arrangement of a truth table. The diagram below illustrates the correspondence between the Karnaugh map and the truth table for the general case of a two variable problem.