You are on page 1of 13

Basic Information

Digital Logic Design I

Chapter 1
Digital Systems and Binary Numbers 

Title: Digital Design 
Code: 
Lecture: 3 
Pre-Requisite: Computer Introduction

Dr. Kamran Abid

Digital Logic Design Ch1-1

Digital Logic Design Ch1-2

Overall Aims of Course

Contents

By the end of the course the students will be able to: 
Grasp basic principles of combinational and sequential
logic design. 
Determine the behavior of a digital logic circuit
(analysis) and translate description of logical problems
to efficient digital logic circuits (synthesis). 
Understanding of how to design a general-purpose
computer, starting with simple logic gates.

Topics

Contact
Hours

No. of
Weeks

-Introduction to the course content, text books,
references and course plane.
- Digital Systems and Binary numbers

9

3

- Boolean Algebra and Logic Gates

6

2

- Gate Level Minimization

9

3

- Combinational Logic

12

4

- Synchronous Sequential Logic

9

3

Total

45

15

Digital Logic Design Ch1-3

Digital Logic Design Ch1-4

Assessment schedule

Essential Books
Assessment Methods
First Midterm Exam
Class Participation
project
Final Exam
Total

Week

Weighting of
Assessments

8

35 %

Every Lecture

25 %

12

Lab

After week15

40 %
100 %

Digital Logic Design Ch1-5 

“DIGITAL DESIGN”, by Mano M. Morris, 4th edition, Prentice-

Hall.

Recommended Books
• “FUNDAMENTALS OF LOGIC DESIGN”, by Charles H. Roth,

Brooks/Cole Thomson Learning.
TO DIGITAL SYSTEMS”, by M.D.
ERCEGOVAC, T. Lang, and J.H. Moreno, Wiley and Sons. 1998.
• “DIGITAL DESIGN, PRINCIPLES AND PRACTICES”, by John
F.Wakely, Latest Edition, Prentice Hall, Eaglewood Cliffs, NJ.
• “FUNDMENTALS OF DIGITAL LOGIC WITH VHDL DESIGN”,
by Stephen Brown and Zvonko Vranesic, McGraw Hill.
• “INTRODUCTION TO DIGITAL LOGIC DESIGN”, by John
• “INTRODUCTION

Digital Logic Design Ch1-6

5 Complements   1.3 Number-base Conversions   1.  Analog system  The physical quantities or signals may vary continuously over a specified range. or binary values are the most prevalent values. industrial and commercial applications  Digital systems  1. 1. Greater accuracy X(t)  Encoding – Giving values to discrete values X(t) t Analog signal t Discrete signalDigital Logic Design Ch1-9 Digital Logic Design Ch1-10 Binary Digital Signal Decimal Number System  Base (also called radix) = 10  An information variable represented by physical quantity. {1.7 0. 8. 2. 6. 4.1 0. 7.Outline of Chapter 1 Digital Systems and Binary Numbers  1. 10 digits { 0.1 Digital Systems  Digital age and information age  1. C. the variable takes on discrete values. 3.9 Binary Logic Telephone switching exchanges Digital camera Electronic calculators.2 Binary Numbers  Digital computers  1. …} and {A.74)10 Digital Logic Design Ch1-12 . PDA's Digital TV  Discrete information-processing systems   Manipulate discrete elements of information For example. 5. B.6 Signed Binary Numbers   1.01 Sum of “Digit x Weight”  Formal Notation  Binary values are represented by values or ranges of values of physical quantities.  Two level. 3. 2.8 Binary Storage and Registers   1.04 -1 -2 d2*B +d1*B +d0*B +d-1*B +d-2*B Logic 0 t Binary digital signal Digital Logic Design Ch1-11 0 (512.  Digital system   The physical quantities or signals can assume only discrete values.   Binary values are represented abstractly by:     Digits 0 and 1 Words (symbols) False (F) and True (T) Words (symbols) Low (L) and High (H) And words On and Off 2 Integer & fraction  Digit Weight  V(t) Weight = (Base)  Logic 1 1 0 -1 5 1 2 -2 7 4 Position  Magnitude 100 10 1 500 10 2 2 1 0.  Quantization – Discretization of Amplitude axix.7 Binary Codes   1.   For digital systems. …}… Digital Logic Design Ch1-7 Digital Logic Design Ch1-8 Analog and Digital Signal Analog to Digital  Sampling – Discretization of time axix.4 Octal and Hexadecimal Numbers  General purposes Many scientific. 9 }  Digit Position undefine 0.

D. 4.4765625)10 (1E5. F }  Weights  Weight = (Base) Position 256  Magnitude  16 1 1 E 5 Sum of “Digit x Weight” 2  Formal Notation 2 1 0 1 0 n 2n n 2n 0 20=1 8 28=256 1 21=2 9 29=512 2 22=4 10 210=1024 3 23=8 11 211=2048 4 24=16 12 212=4096 5 25=32 20 220=1M Mega 6 26=64 30 230=1G Giga 7 27=128 40 240=1T Tera 1/16 1/256 7 A -1 -1 -2 1 *16 +14 *16 +5 *16 +7 *16 +10 *16 -2 =(485. 3. 4. 2. 1. 5. 2. 7 }   Weights  Weight = (Base) Position 64  Magnitude  2 digits { 0. C. E. 5. 6.9375)10 2 4 bits = Nibble -2 =(5. 1.74)8 (101. called binary digits or “bits”  Weights Sum of “Digit x Weight”  Formal Notation 8 1 1/8 1/64 5 1 2 7 4 2 -1 1 2 0 1 0  -1 4 Position  Magnitude  -2 5 *8 +1 *8 +2 *8 +7 *8 +4 *8 Weight = (Base) -2 Sum of “Bit x Weight” 1 1/2 1/4 1 0 1 0 1 2  Formal Notation 1 2 0 1 -1 0 -2 -1 1 *2 +0 *2 +1 *2 +0 *2 +1 *2  Groups of bits =(330.25)10 8 bits = Byte (512.7A)16 Digital Logic Design Ch1-15 Kilo Digital Logic Design Ch1-16 Addition Binary Addition  Decimal Addition  Column Addition 1 + 1 1 Carry 5 5 5 5 1 0 1 1 1 1 1 1 1 1 1 1 0 1 = 61 1 0 1 1 1 = 23 1 0 1 0 0 = 84 + = Ten ≥ Base  Subtract a Base Digital Logic Design Ch1-17 1 0 ≥ (2)10 Digital Logic Design Ch1-18 . 7. 9. 1 }.Octal Number System Binary Number System  Base = 8   Base = 2 8 digits { 0. 3. A. B. 8. 6.01)2 1011 11000101 Digital Logic Design Ch1-13 Digital Logic Design Ch1-14 Hexadecimal Number System The Power of 2  Base = 16  16 digits { 0.

. Fraction Coefficient 5 0 a-1 = 2 a-2 = 4 (0. Fraction Coefficient 25 5 0 a-1 = 1 a-2 = 0 a-3 = 1 Coefficient 7 5 2 a0 = 7 a1 = 5 a2 = 2 (175)10 = (a2 a1 a0)8 = (257)8 Example: (0.24)8 LSB Digital Logic Design Ch1-23 Digital Logic Design Ch1-24 .625)10 175 / 8 = 21 / 8 = 2 /8= 0.3125)10 = (0. .5 *8= 4 Answer: MSB Remainder 21 2 0 Answer: Integer LSB Example: (175)10  Multiply the number by the ‘Base’ (=2) Answer: Digital Logic Design Ch1-20 .3125)10 Integer (0.101)2 0.25 * 2 = 0 0.625 * 2 = 1 0. .3125 * 8 = 2 0.625)10 = (0.a-1 a-2 a-3)2 = (0.5 *2= 1 .Binary Subtraction Binary Multiplication  Borrow a “Base” when needed  Bit by bit 0 1 2 2 0 0 2 1 0 0 1 1 0 1 = 77 1 0 1 1 1 = 23 1 0 1 1 0 = 54 − 0 1 2 = (10)2 1 x 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0 1 1 0 Digital Logic Design Ch1-19 Number Base Conversions Decimal (Integer) to Binary Conversion  Divide the number by the ‘Base’ (=2) Evaluate Magnitude Octal (Base 8) Evaluate Magnitude  Take the remainder (either 0 or 1) as a coefficient  Take the quotient and repeat the division Example: (13)10 Decimal (Base 10) Binary (Base 2) Quotient Remainder Coefficient 6 3 1 0 1 0 1 1 a0 = 1 a1 = 0 a2 = 1 a3 = 1 13/ 2 = 6 /2= 3 /2= 1 /2= Hexadecimal (Base 16) Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2 MSB Evaluate Magnitude Digital Logic Design Ch1-21 Decimal (Fraction) to Binary Conversion Digital Logic Design Ch1-22 Decimal to Octal Conversion Quotient  Take the integer (either 0 or 1) as a coefficient  Take the resultant fraction and repeat the multiplication Example: (0.a-1 a-2 a-3)8 = (0.

Binary.(r-1)’s Complement  Given a number N in base r having n digits. 2 )8 Works both ways (Binary to Octal & Octal to Binary)  16 = 24  Each group of 4 bits represents a hexadecimal digit Assume Zeros Example: ( 1 0 1 1 0 . 0 1 )2 (1 6 . 0 1 )2 ( 2 6 Binary − Hexadecimal Conversion . 2 )8 Assume Zeros Assume Zeros ( 0 1 0 1 1 0 . the (r–1)’s complement of N is defined as: (rn –1) – N Complements  1’s Complement (Diminished Radix Complement) All ‘0’s become ‘1’s All ‘1’s become ‘0’s Example (10110000)2  (01001111)2 If you add a number and its 1’s complement …    Example for 6-digit decimal numbers:   9’s complement is (rn – 1)–N = (106–1)–N = 999999–N 9’s complement of 546700 is 999999–546700 = 453299  Example for 7-digit binary numbers:   1’s complement is (rn – 1) – N = (27–1)–N = 1111111–N 1’s complement of 1011000 is 1111111–1011000 = 0100111  Observation:    Subtraction from (rn – 1) will never require a borrow Diminished radix complement can be computed digit-by-digit For binary: 1 – 0 = 1 and 1 – 1 = 0 Digital Logic Design Ch1-29 10110000 + 01001111 11111111 Digital Logic Design Ch1-30 .  Diminished Radix Complement .Binary − Octal Conversion  8 = 23 Octal Binary 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111  Each group of 3 bits represents an octal digit Assume Zeros Example: ( 1 0 1 1 0 . 4 )16 Decimal.5 Complements  There are two types of complements for each base-r system: the radix complement and diminished radix complement. 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Digital Logic Design Ch1-26  Convert to Binary as an intermediate step ( 2 Binary 0 1 2 3 4 5 6 7 8 9 A B C D E F Works both ways (Binary to Hex & Hex to Binary) Digital Logic Design Ch1-25 Octal − Hexadecimal Conversion Hex 4 )16 Decimal Binary Octal Hex 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 0 1 2 3 4 5 6 7 8 9 A B C D E F Works both ways (Octal to Hex & Hex to Octal) Digital Logic Design Ch1-27 Digital Logic Design Ch1-28 1. Octal and Hexadecimal Example: 6 . 0 1 0 )2 (1 6 .

and (b) Y − X. since rn – N = [(rn − 1) – N] + 1. Digital Logic Design Ch1-33 Digital Logic Design Ch1-34 Complements Complements  Subtraction of unsigned numbers can also be done by means of the (r − 1)'s  Example 1.8  There is no end carry.6  Using 10's complement. subtract 3250 – 72532.7. but this time using 1's complement. Digital Logic Design Ch1-35 Repeat Example 1. Digital Logic Design Ch1-36 . Therefore. There is no end carry. Comparing with the (r − 1) 's complement.  Example 1. by using 2's complement. perform the subtraction (a) X – Y . There is no end carry.  Example 1.7  Given the two binary numbers X = 1010100 and Y = 1000011. the answer is Y – X = − (1's complement of 1101110) = − 0010001.5 The subtraction of two n-digit unsigned numbers M – N in base r can be done as follows:  Using 10's complement. Remember that the (r − 1) 's complement is one less then the r's complement. complement. Therefore.:  OR The r's complement of an n-digit number N in base r is defined as rn – N for N ≠ 0 and as 0 for N = 0. the answer is Y – X = − (2's complement of 1101111) = − 0010001.  10110000  Example: Base-10[(rn – 1) – N ]+ 1 10110000 01001111 The 10's complement of 012398 is 987602 The 10's complement of 246700 is 753300 +  Example: Base-2 1 01010000 01010000 The 2's complement of 1101100 is 0010100 The 2's complement of 0110111 is 1001001 Digital Logic Design Ch1-31 Digital Logic Design Ch1-32 Complements Complements  Subtraction with Complements   Example 1. the answer is – (10's complement of 30718) = − 69282.Complements Complements  2’s Complement (Radix Complement)  Radix Complement Take 1’s complement then add 1 Toggle all bits to the left of the first ‘1’ from the right Example: Number: 1’s Comp. subtract 72532 – 3250. Therefore. we note that the r's complement is obtained by adding 1 to the (r − 1) 's complement.

however. it is convenient to use a different system. there are three different ways to represent -9.  The representation in above example is referred to as signed  The later is most commonly used. the system of representation is referred to as signed-complement system for representing negative numbers. 2.) 11001 = 25 (Unsigned binary No. 00001001 There is only one way to represent +9. invert the remaining left bits  Table 1. If the signs are the same. (± A) − (+ B) = (± A) + (−B) (± A) − (−B) = (± A) + (+ B)  Example: Remember + 7 = 00000111 and 2’s complement should represent -7 and + 19 = 00010011 and 2’s complement should represent -19  Example: (− 6) − (− 13) (11111010 − 11110011) 2’s complement form (11111010 + 00001101) take 2’s complement of -13 00000111 (+ 7) Digital Logic Design Ch1-41 Digital Logic Design Ch1-42 .  In this system a negative number is represented by its complement.1. (2) Inverting values. indicating a negative No.  It is customary to represent the sign with a bit placed in the leftmost position of the number since binary digits.  A carry out of the sign-bit position is discarded.3 lists all possible four-bit signed binary numbers in the three representations.  The addition of two signed binary numbers with negative numbers represented in signed-2's-complement form is obtained from the addition of the two numbers.  Signed complement system can use 1’s or 2’s complement.6 Signed Binary Numbers Signed Binary Numbers  Example:    Representing 9 in binary with 08 bits. we subtract the smaller magnitude from the larger and give the difference the sign of the larger magnitude. Remember:  Signed magnitude system negates a number by changing its sign.  Positive values no change.  Example:    01001 = 9 (Unsigned binary No. If the signs are different. so the complement will start with 1. we need a notation for negative values. Signed Binary Numbers  Arithmetic Subtraction  In 2’s-complement form: 1. 1. starts with 0.  Signed complement system negates a number by taking its complement. consists of magnitude and a symbol ( + or -) ( 0 or 1) Digital Logic Design Ch1-37 Digital Logic Design Ch1-38 1.6 Signed Binary Numbers  To represent negative integers. magnitude convention. 1’s Complement + 1  Remember: (1) Sign change.  Where the No.6 Signed Binary Numbers  Arithmetic operations implemented in a computer. Take the 2’s complement of the subtrahend (including the sign bit) and add it to the minuend (including sign bit).) or +9 (Signed binary No.) No confusion in identifying the bits if the type of representation is known.9 (Signed binary No.  The convention is to make the sign bit 0 for positive and 1 for negative.) or . including their sign bits. we add the two magnitudes and give the sum the common sign. negative values are represented by complements Digital Logic Design Ch1-39 Digital Logic Design Ch1-40 Signed Binary Numbers  Arithmetic addition  The addition of two numbers in the signed-magnitude system follows the rules of ordinary arithmetic. A carry out of sign-bit position is discarded. (3) 1’s complement + 1 or leaving the first 1.  Positive Nos.

BCD and 2421 are weighted codes. BCD code has weight of 8. Digital Logic Design Ch1-43 Digital Logic Design Ch1-44 Binary Codes Binary Code  BCD Code  Example:  It is important to realize that BCD nos  are decimal nos not binary nos. Binary codes needed. 1001. Remaining 6 combinations are discarded. The binary combinations 1010 through 1111 are not used and have no meaning in BCD.. is decimal are written with 0. Decimal 396 is represented in BCD with 12bits as 0011 1001 0110. Digital Logic Design Ch1-48 . Although both contains 1’s and 0’s. 2 and 1 e.  » For 0110 weight is = 8 x 0 + 4 x 1 + 2 x 1 + 1 x 0 = 6 Like wise bit combination 1101 when weighed by 2421 comes to       Decimal Arithmetic: (+375) + (-240) = +135  Hint 6: using 10’s of BCD Digital Logic Design Ch1-47 » 2x1+4x1+2x0+1x1=7 Note in 2421 code some digits can be coded in two possible ways in 2421 like decimal 4 can be assigned to bit combination of 0100 or 1010. because binary circuits are manufactured economically for use in computer. 0001 …. although they use bits in their representation.1.7 Binary Codes Binary Codes  Digital Systems : Two distinct values or circuit elements that     have two stable states. greater than 10 looks different from its equivalent binary No. A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9. Many codes can be formulated by arranging four bits into 10 distinct combinations. The 10 decimal digits form such a set. Each combination representing one element of the set that is being coded. A set of four elements can be coded with two bits and a set of eight elements require three bit code. Consider decimal 185 and its corresponding value in BCD and binary:  BCD addition Digital Logic Design Ch1-45 Digital Logic Design Ch1-46 Binary Code Binary Codes  Example:   Other Decimal Codes Consider the addition of 184 + 576 = 760 in BCD:  Binary code for decimal digits require a minimum of four bits per digit.9 and BCD number use binary code 0000.  BCD Code       A number with k decimal digits will require 4k bits in BCD. if the number of elements in the set is not multiple power of 2. with each group of 4 bits representing one decimal digit. Each code uses 10 out of 16 possibilities. A BCD No.  Difference between a decimal and binary no. An n-bit binary code is a group of n bits that assumes up to 2n distinct combinations of 1’s and 0’s.1.2 ….g. A binary code will have some unassigned bit combinations. 4.

Each segment is assigned a number. Such codes have the property that the 9’s complement of a decimal number is obtained directly by complementing each bit in the pattern. -1 code is an example of assigning both +ve and –ve weights to a decimal code. Digital Logic Design Ch1-50 Binary Codes) Binary Codes  Gray Code  The advantage is that only bit in the code group changes in going from one number to the next. » »   Gray Code  Gray-Code to Binary Conversion » The MSB in Binary Code is the same as the corresponding MSB in the Gray Code. Note: BCD code is not self-complementing . Binary to Gray-Code Conversion » The MSB in GC is the same as the corresponding MSB in the Binary Number. 0110 represents 2 decimal value. » Add each binary code bit generated to the Gray Code bit in the next adjacent position. Binary to Gray Code 0 + 1 + 0 + 0  A typical application of Gray Code is representation of analog data by a continuous change in the angular position of a shaft. Error detection. add each adjacent pair of binary code bits to get the next Gray Code bit. » Going from left to Right. 0 1 1 0 Gray Code to Binary 0 1 + 0 1  1 + 0  Shaft is partitioned into segments. -2. If adjacent segments are made to correspond with the Gray-Code sequence » + 0  The ambiguity is eliminated between the angle of the shaft and the value encoded by the sensor. discard carries. » Representation of analog data.Binary Codes Binary Codes  Other Decimal Codes  Other Decimal Codes  The 2421 and Excess-3 codes are example of self-complementing codes. Un-weighted. non-arithmetic code. The coded combinations is obtained from the corresponding binary value plus 3. » Low power design. 8. Decimal 395 in excess-3 code  » 0110 1100 1000 9’s complement of 395 is 604 as is obtained by complementing each bit      Digital Logic Design Ch1-49 » 1001 0011 0111 The excess-3 code is un-weighted code and has been used in old computers. 0 Digital Logic Design Ch1-53 Digital Logic Design Ch1-54 . Digital Logic Design Ch1-51 Digital Logic Design Ch1-52 Binary Codes Binary Codes  Gray code is used in applications where normal sequence of binary numbers may produce error or ambiguity. Discard carries. 4.

g. CR = carriage return). » We therefore need 6 bit or 7 bit binary code to represent these combinations. Digital Logic Design Ch1-59 Digital Logic Design Ch1-60 . e. are used for symbols of greek and italic type fonts Digital Logic Design Ch1-57 Digital Logic Design Ch1-58 ASCII Character Codes ASCII Properties  American Standard Code for Information Interchange (Refer to Table 1. carriage return (CR)  Information Separator  » Separate the data into divisions Communication Control Characters. and special characters. 7 bit code often used to store on one byte. Elements range between 36 and 64. 26 letters. £ etc. Row 0001) » Digital Logic Design Ch1-55 Digital Logic Design Ch1-56 Binary Codes Binary Codes  ASCII Character Code  Control characters are used for routing data and arranging the  ASCII Character Code printed text into prescribed format.…………. include backspace (BS). 94 Graphic printing characters.  American Standard Code for Information Interchange (ASCII) Character Code 10 decimal digits.Binary Codes Binary Codes  American Standard Code for Information Interchange (ASCII) Character Code  Digital Computers require handling of numbers.  Some non-printing characters are used for text format (e.7)  A popular code used to represent information sent as characterbased data. »  e. b7 most significant bit in table 1. or symbols such as alphabets.g.7 the letter A is represented by ASCII as 1000001 (Col 100. paragraphs & pages. STX and ETX start and end text areas).  Types of Control Characters:  Format Effectors » To control the format of printing.  To represent these all it is needed to represent them with binary code  The same binary code is also needed to represent numerals and special characters like \$.  It uses 7-bits to represent:    ASCII has some interesting properties:    Digits 0 to 9 span Hexadecimal values 3016 to 3916 Upper case A-Z span 4116 to 5A16 Lower case a-z span 6116 to 7A16 » Lower to upper case translation (and vice versa) occurs by flipping bit 6. characters. b2. b7. Useful during the transmission of text between remote terminals. 34 Non-printing characters. » Or in between 64 and 128 if both lower and upper case letters are needed.g. BS = Backspace.g. start & end of text STX & ETX ASCII. if only capital letters are included.  Other non-printing characters are used for record marking and flow control (e.. » Seven bits with b1. where MSB is 1.

speakers Input/Output  Register Transfer    Synchronous or Asynchronous? A transfer of the information stored in one register to another.1 Transfer of information among register Digital Logic Design Ch1-65 Figure 1. R1. A register with n cells can store any discrete quantity of information that contains n bits. n cells 2n possible states CPU  A binary cell    Two stable state Store one bit of information Examples: flip-flop circuits. in the form of extra bits. LCD. A simple form of redundancy is parity. Digital Logic Design Ch1-63 Transfer of information Digital Logic Design Ch1-64 Transfer of information  The other major component of a digital system   Circuit elements to manipulate individual bits of information Load-store machine LD LD ADD SD Figure 1. capacitor Inputs: Keyboard. One of the major operations in digital system. can be incorporated into binary code words to detect and correct errors. R3. A code word has even parity if the number of 1’s in the code word is even. An example in next slides. extra information). Parity can detect all singlebit errors and some multiple-bit errors.Binary Codes Binary Codes  Error-Detecting Code    Error-Detecting Code To detect errors in data communication and processing.2 Example of binary information processing R1.8 Binary Storage and Registers Digital Logic Design Ch1-62 A Digital Computer Example  Registers  A binary cell is a device that possesses two stable states and is capable of storing one of the two states. A parity bit is an extra bit included with a message to make the total number of 1's either even or odd. Digital Logic Design Ch1-66 .    Example:  Consider the following two characters and their even and odd parity:    Redundancy (e.  A register is a group of binary cells. A code word has odd parity if the number of 1’s in the code word is odd. an eighth bit is sometimes added to the ASCII character to indicate its parity. modem. R3. Example: (even parity) Message A: 100010011 Message B: 10001001 0 (odd parity) Digital Logic Design Ch1-61 1. R2. R2. modem. mouse.g. microphone  A register   Memory A group of binary cells AX in x86 CPU Control unit Datapath Outputs: CRT. ferrite cores. an extra bit appended onto the code word to make the number of 1’s odd or even.

 Three basic logical operations: AND.1.9 Binary Logic Binary Logic  Definition of Binary Logic  Binary logic consists of binary variables and a set of logical operations. y. x. such as A. z.4 Symbols for digital logic circuits Fig.3 Example of binary signals Digital Logic Design Ch1-69 Binary Logic Binary Logic  Logic gates  Digital Logic Design Ch1-70  Logic gates Graphic Symbols and Input-Output Signals for Logic gates:  Graphic Symbols and Input-Output Signals for Logic gates: Fig. 1.6 Gates with multiple inputs Fig. and NOT. and Logic Gates AND OR NOT x y z x y z x z 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 z=x•y=xy z=x+y z = x = x’ Digital Logic Design Ch1-67 Digital Logic Design Ch1-68 Switching Circuits Binary Logic  Logic gates AND OR  Example of binary signals 3 Logic 1 2 Un-define 1 Logic 0 0 Figure 1.5 Input-Output signals for gates Digital Logic Design Ch1-71 Digital Logic Design Ch1-72 . with each variable having two and only two distinct possible values: 1 and 0. OR. B. 1. C. 1. Boolean Expressions. etc.  The variables are designated by letters of the alphabet.  Truth Tables.

 complement form.Quiz 1 Quiz 1  What is the largest binary number that can be represented with 14 bits. signed 1’s complement and signed 2’s complement of -2. -4.    (10110.0101)2 (26.24)8 (FAFA)16   11011010 01110110 00000000 25000000  Find the 16’s complement of B2FA   X = 1010100 and Y = 1000011 Perform subtraction X-Y Y-X using » Using 2’s complement form » Using 1’s complement form  Write signed magnitude. 68BE to binary and then binary to octal.  Convert the Hexadecimal No.  Two binary Nos. »  Obtain 1’s and 2’s complement of the following   Perform arithmetic subtraction of (− 6) − (− 13) using 2’s Digital Logic Design Ch1-73 Digital Logic Design Ch1-74 .  Express the following numbers in decimal. -6 and -7 »  Obtain the 9’s and 10’s complement of the following.