Top Banner
Digital Logic And Computer Organization UNIT – I 1.0) Introduction Inside a computer system, data is stored in a format that cannot be easily read by human beings. This is the reason why input and output (I/O) interfaces are required. Every computer stores numbers, letters and other special characters in a coded form. Before going into the details of these codes, it is essential to have a basic understanding of the number system. It also introduces some of the commonly used number systems by computer professionals and the relationship between them. This chapter deals with the basic fundamentals of number system, computer arithmetic and binary Codes. Data in a computer is stored in a series of bits which are often interpreted in blocks known as bytes [8 bits] or words. The ALU (Arithmetic and Logic Unit) performs arithmetic operations on data and the control unit needs to ‘decode’ instructions. Both of these functions are performed by logic circuits. The second part of this chapter deals with the digital logic, the Boolean algebra and the logical gates. 1.1) Objectives This chapter presents the various binary systems suitable for representing information in digital systems. The binary number system is explained and binary codes are illustrated. Examples are given for addition and subtraction of signed binary numbers and decimal numbers in BCD. In this Chapter you will learn about Introduction Number Systems Decimal Number System Binary Number System Octal Number System Hexadecimal Number System Page1
60
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Unit 1

Digital Logic And Computer Organization

UNIT – I

1.0) Introduction

Inside a computer system, data is stored in a format that cannot be easily read by human beings. This is the reason why input and output (I/O) interfaces are required. Every computer stores numbers, letters and other special characters in a coded form. Before going into the details of these codes, it is essential to have a basic understanding of the number system. It also introduces some of the commonly used number systems by computer professionals and the relationship between them.

This chapter deals with the basic fundamentals of number system, computer arithmetic and binary Codes.

Data in a computer is stored in a series of bits which are often interpreted in blocks known as bytes [8 bits] or words. The ALU (Arithmetic and Logic Unit) performs arithmetic operations on data and the control unit needs to ‘decode’ instructions. Both of these functions are performed by logic circuits.

The second part of this chapter deals with the digital logic, the Boolean algebra and the logical gates.

1.1) Objectives

This chapter presents the various binary systems suitable for representing information in digital systems. The binary number system is explained and binary codes are illustrated. Examples are given for addition and subtraction of signed binary numbers and decimal numbers in BCD. In this Chapter you will learn about

Introduction Number Systems Decimal Number System Binary Number System Octal Number System Hexadecimal Number System Number System Conversions Representation of Negative Numbers Binary Coded Decimal and Gray Code Boolean Algebra Logic Gates Half Adder Full Adder Subtractors Karnaugh Maps (K-Maps) The Flip Flop

Page1

Page 2: Unit 1

Digital Logic And Computer Organization

1.2) Content

1.2.1 Number Systems

Number systems are basically of two types: non-positional and positional.

Non-Positional Number Systems

In early days, human beings counted on fingers. When ten fingers were not adequate, stones, pebbles or sticks were used to indicate values. This method of counting uses an additive approach or the non-positional number system. In this system, symbols such as I for 1, II for 2, III for 3, IIII for 4, IIIII for 5, etc are used. Each symbol represents the same value regardless of its position in the number and the symbols are simply added to find out the value of a particular number. Since it is very difficult to perform arithmetic with such a number system, positional number systems were developed as the centuries passed.

Positional Number Systems

In a positional number system, there are only a few symbols called digits and these symbols represent different values depending on the position they occupy in the number. The value of each digit in such a number is determined by three considerations.

1. the digit itself;2. the position of the digit in the number; and3. the base of the number system (where base is defined as the total number of

digits available in the number system).

The number system that is used in our day-to-day life is called the Decimal number system. In this system, the base is equal to 10 because there are altogether ten symbols or digits (0,1,2,3,4,5,6,7,8,9) used in this system. In the decimal system, the successive positions to the left of the decimal point represent units, tens, hundreds, thousands, etc.

It may also be observed that the same digit signifies different values depending upon the position it occupies in the number. For example,

In 258610 the digit 6 signifies 6 100 = 6In 256810 the digit 6 signifies 6 101 = 60In 265810 the digit 6 signifies 6 102 = 600In 625810 the digit 6 signifies 6 103 = 6000

Thus using the available digits and arranging them in various positions can represent any number. The principles that apply to the decimal system apply in any other positional number system.

Page2

Page 3: Unit 1

Digital Logic And Computer Organization

There are two characteristics of all number systems that are suggested by the value of the base. In all the number systems, the value of the base determines the total number of different symbols or digits available in the number system. The first of these choices is always zero. The second characteristic is that the maximum value of a single digit is always equal to one less than the value of the base.

Decimal Number System

The conventional number system used currently is the decimal number system. The decimal number system has the digits from 0 to 9 and the numbers have a base ten. The smallest number in this system is 0 and the largest number is 9. A decimal number fifty-eight is represented as

(58)10

Any decimal number can be converted to another base by dividing the given decimal number by the base to be converted to.

Binary Number System

The binary number system is exactly like the decimal system except that the base is 2 instead of 10. There are only two symbols or digits (0 and 1) that can be used in this number system. Note the largest single digit is 1 (one less than the base). Again, each position in a binary number represents a power of the base (2). As such, in this system, the rightmost position is the units (20) position, the second position from the right is the 2’s (21) position and proceeding in this way the third position is the 4’s (2 2) position, the fourth position is the 8’s (23) position and so on. Thus, the decimal equivalent of the binary number 10101 (written as 101012) is

(124) + (023) + (122) + (021) + (120)

or 16 + 0 + 4 + 0 + 1

or 21

In order to be specific about which system is referred to, it is common practice to indicate the base as a subscript. Thus the numbers are represented as:

101012 = 2110

The common abbreviation bit often refers to ‘Binary digit’. Thus, a “bit” in computer technology means either a 0 or a 1. A binary number consisting of n bits is called an n-bit number. Table 1.1 lists all the 3-bit numbers along with their decimal equivalent. Remember that there are only two digits, 0 and 1, in the binary system and hence the binary equivalent of the decimal number 2 has to be stated as 10 (read as one,zero).

Another important point to note is that with 3 bits (positions), only 8 (23) different patterns of 0’s and 1’s are possible and from Table 1.1 it may be seen that a 3-bit number

Page3

Page 4: Unit 1

Digital Logic And Computer Organization

can have one of the 8 values in the range 0 to 7. In fact, it can be shown that any decimal number in the range 0 to 2n-1 can be represented in the binary form as an n-bit number.

Table 1.1: 3-bit Numbers With their Decimal Values

Octal Number System

In the octal number system the base is 8. So in this system, there are only eight symbols or digits: 0,1,2,3,4,5,6 and 7 (8 and 9 do not exist in this system). Here, the largest single digit is 7 (one less than the base). Again, each position in an octal number represents a power of the base (8). Thus, the decimal equivalent of the octal number 2057 (written as 20578) is :

(283)+ (082) + (581)+ (780)or 1024 + 0 + 40 + 7or 1071

Thus, 20578 = 107110.

Observe that since there are only 8 digits in the octal number system, so 3 bits (23

=8) are sufficient to represent any octal number in binary.

Hexadecimal Number System

The hexadecimal number system is one with a base of 16. The base of 16 suggests choices of 16 single-character digits or symbols. The first 10 digits are the digits of a decimal system 0,1,2,3,4,5,6,7,8 and 9. The remaining six digits are denoted by A,B,C,D,E and F representing the decimal values of 10,11,12,13,14 and 15 respectively. In the hexadecimal number system, therefore, the letters A through F are number digits. The number A has a decimal equivalent value of 10, B has a value of 11 and so on. Thus, the largest single digit is F or 15 (one less than the base). Again, each position in a hexadecimal system represents a power of the base (16). Thus, the decimal equivalent of the hexadecimal number 1AF is 431.

(1162) + (A161) + (F160)

or (1256)+(1016)+(151)

or 256 + 160 + 15

or 431

Thus, 1AF16 = 43110

Observe that since there are only 16 digits in the hexadecimal number system, 4 bits (24 = 16) are sufficient to represent any hexadecimal number in binary.

Page4

Binary Decimal Equivalent

000 0001 1 010 2011 3100 4101 5110 6111 7

Page 5: Unit 1

Digital Logic And Computer Organization

1.2.2 Number System Conversions

Numbers expressed in decimal are much more meaningful than are values expressed in any other number system. This is mainly because of the fact that decimal numbers are used in day-to-day life. Any number value in one number system can be represented in any other number system. Because the input and the final output values are to be in decimal, computer professionals are often required to convert numbers in other number systems to decimal and vice versa. There are many methods or techniques that can be used to convert numbers from one base to another.

Converting to Decimal from another base

The following three steps are used to convert to a base 10 value from any other number system:

Step 1: Determine the column (Positional) value of each digit (this depends on the position of the digits and the base of the number system).

Step 2: Multiply the obtained column values (In Step 1) with the digits in the corresponding columns.

Step 3: Sum the products calculated in Step 2. The total is the equivalent value in decimal.

Example 1.1

110012 = ?10

Solution:

Step 1: Determine column values

Column Number Column Value(from right)

1 20 = 12 21 = 23 22 = 44 23 = 85 24 =16

Step 2: Multiply column values by corresponding column digits

16 8 4 2 1 1 1 0 0 1____ ____ ____ ____ ____ 16 8 0 0 1

Step 3: Sum the products

Page5

Page 6: Unit 1

Digital Logic And Computer Organization

16+8+0+0+1=25

Hence, 110012 = 2510

Example 1.2

47068 = ?10

Solution:Step 1:

Column Number Column Value (from right)

1 80 = 12 81 = 83 82 = 644 83 = 512

Step 2:

512 64 8 1 4 7 0 6 2048 448 0 6

Step 3:

2048 + 448 + 0 + 6 = 2502Hence, 47068 = 250210

Example 1.3

1AC16 = ?10

Solution:

1AC16 = 1162 + A161 + C160

= 1256 + 1016 + 121 = 256 + 160 + 12 = 42810

Converting from a Base 10 to a New Base

This method is also called as Division – Remainder Technique. The following four steps are used to convert a number from base 10 to a new base.

Step 1: Divide the decimal number to be converted, by the value of the new base.

Step 2: Record the remainder from step1 as the Rightmost digit (least significant

Page6

Page 7: Unit 1

Digital Logic And Computer Organization

digit) of the number to the new base.

Step 3: Divide the quotient of the previous division by the new base.

Step 4: Record the remainder from step 3 as the next digit (to the left) of the number to the new base.

Repeat steps 3 and 4, recording remainders from right to left, until the quotient becomes zero in step 3. Note the last remainder thus obtained will be the most significant digit (MSD) of the new base number.

Example 1.4

2510 = ?2

Solution:

Steps 1 & 2: 25/2=12 and remainder 1Steps 3 & 4: 12/2=6 and remainder 0Steps 3 & 4: 6/2 =3 and remainder 0Steps 3 & 4: 3/2 =1 and remainder 1Steps 3 & 4: 1/2 =0 and remainder 1

As mentioned in Steps 2 & 4, the remainders have to be arranged in the reverse order so that the first remainder becomes the Least Significant Digit (LSD) and the last remainder becomes the Most Significant Digit (MSD).

Hence 2510 = 110012

Example 1.5

4210 = ?2

Solution:

2 42 Remainders 21 0 10 1

5 0 2 1 1 0

Page7

Page 8: Unit 1

Digital Logic And Computer Organization

0 1

Hence,4210 = 1010102

Example 1.6

95210 = ? 8

Solution:

952 Remainders

119 0 14 7 1 6 0 1

Hence, 95210 = 16708

Example 1.7

42810 =?16

Solution:

16 428 Remainders in Hexadecimal

26 12 = C

1 10 = A

0 1 = 1

Hence, 42810 =1AC16

Converting from a base other than 10 to a base other than 10

The following two steps are used to convert a number from a base other than 10 to a base other than 10.

Step1: Convert the original number to a decimal number (base 10).Step2: Convert the decimal number so obtained to the new base.

Example 1.8

1011102=?8

Page8

8

Page 9: Unit 1

Digital Logic And Computer Organization

Solution:

Step1: Convert 1011102 to base 10

1011102 = 125 + 024 + 123 + 122 + 121 + 020

= 32 + 0 + 8 + 4 + 2 + 0 = 4610

Step2: Convert 4610 to base 8.

8 46 Remainders

5 6

0 5

Hence, 4610 = 568

So, 1011102 = 4610=568

Thus, 1011102 = 568

Shortcut methods for conversions

There are shortcut methods of conversion from one base to another. The octal number can be converted to hexadecimal format without being converted to decimal and then being divided by 16. Each digit of the octal number are split and represented by equivalent binary numbers of 3 bits each. And the binary number can then be grouped into 4 bits each for representing a hexadecimal number. The shortcut methods of conversion are as follows:

Binary to Octal

The following steps are used in this method:

Step 1: Divide the binary digits into groups of three (starting from the right).Step 2: Convert each group of three binary digits into one octal digit.

Since decimal digits 0 to 7 are equal to octal digits 0 to 7 so binary to decimal conversion can be used in this step.

Example 1.9

1011102 = ?8

Solution:

Step 1: Divide the binary digits into groups of 3 starting from right (LSD)

101 110

Page9

Page 10: Unit 1

Digital Logic And Computer Organization

Step 2: Convert each group into one digit of octal (use binary-to-decimal conversion)

1012 = 122 + 021 + 120

= 4 + 0 + 1 = 58

1102 = 122 + 121 + 020 = 4 + 2 + 0 = 68

Hence, 1011102 = 568

Octal to Binary

The following steps are used in this method:

Step 1 : Convert each octal digit to a 3 digit binary number (The octal digits may be treated as Decimal for this conversion).

Step 2: Combine all the resulting binary groups (of 3 digits each) into a single binary number.

Example 1.10

5628 = ?2

Solution:

Step 1: Convert each octal digit to 3 binary digits.

58 = 1012

68 = 1102

28 = 0102

Step 2: Combine the binary groups.

5628 = 101 110 010 5 6 2 Hence, 5628 = 1011100102

Example 1.11

67518 = ?2

Solution :

Page10

Page 11: Unit 1

Digital Logic And Computer Organization

67518 = 110 111 101 001 6 7 5 1

= 1101111010012

Hence, 67518 = 1101111010012

Binary to Hexadecimal

The following steps are used in this method:

Step 1: Divide the binary digits into groups of four (Starting from the right).Step 2: Convert each group of four binary digits to one hexadecimal digit. (The hexadecimal digits 0 to 9 are equal to decimal digits 0 to 9 and hexadecimal digits. A to F are equal to decimal digits 10 to 15. The decimal values 10 to 15 must be represented as hexadecimal A to F.

Example 1.12

110100112 =? 16

Solution:

Step 1: Divide the binary digits into groups of 4. 1101 0011

Step 2: Convert each group of 4 binary digits to 1 hexadecimal digit.

11012 = 123 +122 +02 1+120

= 8 + 4 + 0 + 1 = 1310

= D16

0011 2 = 02 3 + 022 + 12 1 + 12 0 = 0 + 0 + 2 + 1 = 3 16

Hence, 110100112 = D3 16

Example 1.13

101101011002 =? 16

Solution:

Page11

Page 12: Unit 1

Digital Logic And Computer Organization

101101011002 = 0101 1010 1100

(Group 4 digits from right)

= 5AC (Convert each group to a hexadecimal digit)

Hence, 101101011002 = 5AC 16

Hexadecimal to Binary

The following steps are used in this method:

Step 1: Convert the decimal equivalent of hexadecimal digit to 4 bit binary number.Step 2: Combine all the resulting binary groups (of 4 digits each) into single binary

number.

Example 1.14

2AB16 = ?2

Solution:

Step 1: Convert the decimal equivalent of each hexadecimal digit into 4 binary digits. 216 = 210 = 00102

A16 = 1010 = 10102

B16 = 1110 = 10112

Step 2: Combine the binary groups

2AB16 = 0010 1010 1011 2 A B

Hence, 2AB16 = 001010101011 2

Example 1.15

ABC16 = ? 2

Solution:

ABC16 = 1010 1011 1100 A B C

= 1010101111002

Page12

Page 13: Unit 1

Digital Logic And Computer Organization

Hence, ABC16 = 1010101111002

Table 1.2: Relationship between Decimal, Hexadecimal, Binary and Octal NumberSystems.

Finally, the above Table 1.2 summarizes the relationship between the decimal, binary, hexadecimal and octal number systems. Note that the maximum value for a single digit of octal (7) is equal to the maximum value of three digits of binary. The value range of one digit of octal duplicates the value range of three digits of binary. If octal digits are substituted for binary digits, the substitution is on a one-to-three basis.

Similarly, note that the maximum value of one digit in hexadecimal is equal to the maximum value of four digits in binary. Thus, the value range of one digit of hexadecimal is equivalent to the value range of four digits of binary. Therefore, hexadecimal shortcut notation is a one-to-four reduction in the space and time required for memory dump.

1.2.3 Fractional Numbers

In binary number system, fractional numbers are formed in the same general way as in the decimal system. A fraction in decimal number system can be represented as:

0.235 = (210-1) + (310-2) + (510-3)

and

68.53 = (6101) + (8100) + (510-1) + (310-2)

Page13

Decimal Hexa Binary Octal Decimal

0 0 0 0 1 1 1 1 2 2 10 2 3 3 11 3 4 4 100 4 5 5 101 5 6 6 110 6 7 7 111 7 8 8 1000 10 9 9 1001 1110 A 1010 1211 B 1011 1312 C 1100 1413 D 1101 1514 E 1110 1615 F 1111 1716 10 10000 20

Page 14: Unit 1

Digital Logic And Computer Organization

Similarly in the binary system,

0.101= (12-1) + (02-2) + (12-3) and

10.01= (121) + (020) +(02-1)+(12-2)

Thus, the binary point serves the same purpose as the decimal point. Some of the positional values in the binary system are given below.

Binary Point Position 4 3 2 1 0 . -1 -2 -3 -4

Position Value 24 23 22 21 20 2-1 2-2 2-3 2–4

Quantity Represented 16 8 4 2 1 1/2 1/4 1/8 1/16

In general, a number in a number system with base b would be written as:

an an-1 … a1 a0 .a-1 a-2 … a-m

and would be interpreted to mean

an bn + an-1 bn-1 + … + a0 b0

+ a-1 b-1 + a-2 b-2

… + a-m b-m

The symbols an a n-1, …., a-m used in the above representation should be one of the symbols allowed in the number system. Thus, as per the above mentioned general rule,

46.328 = (481) + (680) + (38-1) + (28-2)

and

5A.3C16 = (5161)+(A160)+(316-1)+(C16-2)

Example 1.16

Find the decimal equivalent of the binary number 110.101

Solution:

110.1012 = 122 + 121 + 020 +12-1+02-2+12-3

Page14

Page 15: Unit 1

Digital Logic And Computer Organization

= 4 + 2 + 0 + .5 + 0 + .125 = 6 + 0.5 + 0.125 = 6.62510

Example 1.17

Find the decimal equivalent of the octal number 127.54

Solution:

127.548 = 182 + 281+780+58-1+48-2

= 64 + 16 + 7 + 5/8 + 4/64 = 87+0.625+0.0625 = 87.687510

Example 1.18

Find the decimal equivalent of the hexadecimal number 2B.C4

Solution:

2B.C416 = 2x16 1+ Bx160 + Cx16-1+4x16-2

= 32 + 11 + C/16 + 4/256 = 43 + 0.75 + 0.015625 = 43.765652 10

1.2.4 Representation of Negative Number

The 2’s complement is used to represent the negative of a binary number. Before proceeding to 2’s complement in the binary number system, 9’s and 10’s complement in the decimal number system are dealt with for better understanding.

9’s complement.

To obtain the 9’s complement of a decimal number each digit of the number is subtracted from 9. For example, the 9’s complement of 45 is (99-45) = 54.

The 9’s complement of 523 = (999 – 523) = 476.

10’s complement.

The 10’s complement of a decimal number = its 9’s complement + 1.The 10’s complement of 45 = 54 + 1 = 55.The 10’s complement of 523 = 476 + 1 = 477.

Page15

Page 16: Unit 1

Digital Logic And Computer Organization

On adding the number 45 and its 10’s complement, the sum becomes zero (omitting the carry over).

Example 14 5 (decimal number)

+ 5 5 (its 10’s complement)0 0 Carry =1

In this case the decimal number is of two digits. If the sum of the number and its 10’s complement only up to two digits are considered, the sum becomes zero. Similarly,

Example 25 2 3 (decimal number)

+ 4 7 7 (its 10’s complement)________________________________________

0 0 0 Carry = 1

The decimal number 523 is of three digits. Considering the sum of the number and its 10’s complement only up to three digits, the sum becomes zero. Thus it is concluded that the 10’s complement gives the negative value of the number

The 10’s complement of a decimal number = - decimal number.

1’s Complement.

The 1’s complement in the binary number system is similar to the 9’s complement in the decimal system. The 1’s complement of a binary number is obtained by subtracting each bit of the number from 1. The 1’s complement of 01 is 10. The 1’s complement of 111 is 000. Thus, the 1’s complement of a binary number can be obtained by simply changing bit 1 to 0 and 0 to 1.

Example 1.

Find 1’s complement of 100110.The 1’s complement of 100110 = 011001.

Example 2

Find 1’s complement of 0000The 1’s complement of 0000 = 1111.

Example 3

Find 1’s complement of 11111.The 1’s complement of 11111 = 00000.

Page16

Page 17: Unit 1

Digital Logic And Computer Organization

2’s Complement.

The 2’s complement in the binary number system is similar to the 10’s complement in the decimal number system.

The 2’s complement of binary number = its 1’s complement + 1.

Example 1.

Find 2’s complement of 10011.The 2’s complement of 10011 = 01100 + 1 = 01101.

Example 2.

Find 2’s complement of 111.The 2’s complement of 111 = 000 + 1 = 001.

Example 3.

Find 2’s complement of 0000.The 2’s complement of 0000 = 1111 + 1 = 0000.

Consider a case of adding a binary number to its 2’s complement.

Example 1.

Binary number = 1001Its 1’s complement = 0110Its 2’s complement = 0110 + 1 = 0111.Number + its 2’s complement = 1 0 0 1

+ 0 1 1 1__________________ 0 0 0 0

Carry =1

The last carry is lost if the processor is of 4 bits or only 4 bits sum is considered. For 8-bit processor the number and 2’s complement will be written in 8 bits as given below:

Number = 000010011’s complement = 111101102’s complement = 11110110 + 1

= 11110111Number = 00001001+ 2’s complement = 11110111

__________________00000000 carry =1

The last carry will be neglected, if the 8 bit sum is considered.

Page17

Page 18: Unit 1

Digital Logic And Computer Organization

Example 2+ 4 (decimal) = 00000100 (binary)

-4 = Its 2’s complement = 11111011 + 1 = 11111100

+4 = 00000100-4 = 11111100

______________________00000000

Example 3Add + 5 and –7

7 = 00000111 -7 = 11111000 + 1

= 11111001+5 = 00000101-7 = 11111001____________________________-2 = 11111110

Check: 2 = 00000010- 2 = 11111101 + 1

= 11111110Thus, the 2’s complement of a binary number represents its negative.

1.2.5 Binary Subtraction Using 2’s Complement.

The addition of 2’s complement of a number is equivalent to the subtraction of the number. Suppose, 0010 ( 2 decimal) has to be subtracted from 0101 ( 5 decimal ). If the 2’s complement of 0010 (2 decimal) is added to 0101 (5 decimal) the sum will be 0011 (3 decimal). It is equal to 0101 (5 decimal) – 0010 (2 decimal) = 0011 (3 decimal).

Ordinary binary subtraction: 0101 (5 decimal)- 0010 (-2 decimal)____________________ 0011 (3 decimal)

Subtraction using 2’s complement:

1’s complement of 0010 (2 decimal) = 11012’s complement of 0010 = 1101 + 1 = 1110 0101 (5 decimal)

+ 1110 ( + 2’s complement of 2)

______________________________________

Page18

Page 19: Unit 1

Digital Logic And Computer Organization

0011 (3 decimal)

The carry of the last stage is neglected.

1.2.6 Binary Coded Decimal

One of the most widely used representations of numerical data is the binary coded decimal (BCD) form in which a 4-bit binary number represents each integer of a decimal number. It is particularly useful for the driving of display devices where a decimal output is desired. BCD usually refers to such coding in which the binary digits have their normal values, that is, 8421. Sometimes it is written "8421 BCD" to clearly distinguish it from other binary codes such as the 4221 Code, but when BCD is used without qualification, the 8421 version is assumed.

Figure 1.1: Binary Coded Decimal

The following table gives the decimal number along with their BCD codes.__________________________________________________________________

Decimal Number Standard BCD Number__________________________________________________________________

0 00001 00012 00103 00114 01005 01016 01107 01118 10009 100110 0001000011 0001000112 0001001013 0001001114 0001010015 0001010130 0011000045 0100010164 0110010073 0111001198 10011000

__________________________________________________________________

Page19

Page 20: Unit 1

Digital Logic And Computer Organization

Table 1.3: Decimal to Standard BCD Conversion

1.2.7 Alphanumeric Coding

For the inherently binary world of the computer, it is necessary to put all symbols, letters, numbers, etc. into binary form. The most commonly used alphanumeric code is the ASCII code, with others like the EBCDIC code being applied in some communication applications.

Gray Code

The reflected binary or Gray Code is shown in Table 1.4. In this code only one bit changes in the transition from one number to the next higher number. The Gray code is used in shaft encoder, which is to indicate the angular position of a shaft. The use of Gray code reduces errors. Suppose that the present position of the shaft is indicated by Gray code 0100, which is for 7. If the position changes to 8, the Gray code will be 1100. If the detector does not pick up the encoder the new change in binary bit will show the previous position, that is, 7. But in case of ordinary binary code 7 is represented by 0111 and 8 by 1000. Now suppose the detector picks up the least significant bits, that is, 000, but fails to pick up the most significant bit 1, the output will be 0000 instead of 1000. So there is a large error if a simple binary code is used for a shaft encoder.

__________________________________________________________________ Decimal Binary Code Gray Code

__________________________________________________________________

0 0000 00001 0001 00012 0010 00113 0011 00104 0100 01105 0101 01116 0110 01017 0111 01008 1000 11009 1001 110110 1010 111111 1011 111012 1100 101013 1101 101114 1110 100115 1111 1000

Table 1.4. Gray Code1’s Complement form2’s Complement Form

Computer logic

Page20

Page 21: Unit 1

Digital Logic And Computer Organization

Computer Logic is based on Boolean Algebra (and, or, etc.) and it is possible to combine such operations into complex logical expressions. For example,

(A OR B) AND (C NOT D)

There are rules governing priority of the operators.

Boolean Variables

A Boolean variable has one of two values:

often referred to as TRUE or FALSE. dealing with an electronic system has either a voltage present (e.g. 5 or 3.3V) a

value of 1 or no voltage a value of 0.

1.2.8 Boolean Algebra

Boolean Algebra is the algebra of binary variables. Binary variables are also known as Boolean variables. Boolean variables have only two values 0 and 1. The only logical operations in Boolean algebra are OR, AND and NOT operations. The mathematical symbol + and . stand for OR and AND operations respectively. The symbol or ‘ is used for NOT (INVERT or COMPLEMENT) operation.

There are two important means to express the relationship between input and output variables of a digital system: truth table and Boolean expression. The aim of a designer is to use minimum number of basic circuits to perform a digital operation for which the first step is to write a Boolean expression for the system. This expression is minimized using Boolean theorems. The map is also a minimization technique which is used in the design of digital systems. The minimum number of circuits reduces the cost and increases the speed and reliability of the system.

Table 1.1 presents a list of important Boolean theorems. The first four laws are for OR operation. The first law is

A + 0 = A

The binary variable A can have only two values, either 0 or 1. When 0 is put in the above equation for A, the above equation becomes: 0 + 0 = 0;

This is true for OR operation.

Similarly, when 1 is put for A, the following is got

Page21

Page 22: Unit 1

Digital Logic And Computer Organization

1 + 0 =1

which is true for OR operation. Similarly, other laws can be explained putting 0 or 1 value for the binary variable A.

1. A + 0 = A2. A + 1 =1 OR Laws3. A + A = A4. A + A = 1

5. A.0 = 06. A.1 = A AND Laws7. A.A =A8. A . A=0

9. A = A10. 1 = 011. 0 = 1 Laws of complementation12. If A=0, then A =113. If A=1, then A = 0

14. A + B = B + A15. A .B = B .A Commutative laws

16. (A + B) + C = A + (B + C) = A + B + C Associative Laws17. (A.B).C = A.(B.C) = A.B.C

18. A . (B+C) = A .B + A .C Distributive Laws

19. A + AB = A20. A . (A + B) = A21. A + AB = A + B22. A . (A + B) = AB23. AB + AB = A24. (A + B)(A + B) = A25. AB + AC = (A + C) . (A + B)26. (A + B) ( A + C) = AC + AB27. AB + AC + BC = AB + AC28. (A + B)(A + C)(B + C) = (A + B)(A + C)29. (A + B +C + …) = A . B . C….30. A.B.C… = A + B + C

Page22

Page 23: Unit 1

Digital Logic And Computer Organization

Table 1.1. Boolean Algebraic Theorems

In Table 1.1, laws 5 to 8 are for AND operation. The fifth law is A.0 = 0. This law is true for AND operation when A is put equal to either 0 to 1. Similarly, laws from 6 to 8 are true when the value of A is put either 0 or 1.Laws of complementation from 9 to 13 are obvious and very simple.

Similarly all the laws can be justified by either assuming the value 1 or 0 for the variable used or using truth table or with the help of other Boolean laws.

1.2.9 Logic Gates

The term ‘Gate’ is used to describe the members of a set of basic electronic components which, when combined with each other, are able to perform complex logical and arithmetic operations. 'Gates' are the physical realization of the simple Boolean expressions. Logic gates can be designed with only a few electronic components.

Types of Logic Gates

The transistors are the main components in designing the circuits. There are various types of logic gates.

Figure 1.1: Basic Gates

a. 'OR' Gate

If any input is logic 1 then the output of an OR gate will be logic 1.

Figure 1.2: OR Gate Truth Table

Page23

Page 24: Unit 1

Digital Logic And Computer Organization

X       Y       X OR Y 0       0          0 0       1          1 1       0          1 1       1          1

The output value is 1 when at least one input value is 1

b. 'AND' Gate

The AND gate requires both inputs to be logic 1 for an output of logic 1

Figure 1.3: AND Gate

Truth Table

X       Y       X AND Y 0       0          0 0       1          0 1       0          0 1       1          1

The output is 1 only when both inputs are 1

c. XOR Gate

If both the inputs are different the output is high.

Figure 1.4: XOR Gate

Truth Table

X       Y       X XOR Y 0       0          0 0       1          1 1       0          1 1       1          0

Page24

Page 25: Unit 1

Digital Logic And Computer Organization

d. 'NOT' Gate (Inverter Gate)

Any input is inverted. Logic 1 input yields logic 0 as output and vice versa.

Figure 1.5: NOT Gate

Truth Table

X       X NOT Y 0          1 1          0

Not Gate takes only one input and is written as X or ~X in Boolean expressions.

e. NAND Gate

It is a combination of AND gate and a NOT gate.

Figure 1.6: NAND Gate

Truth Table

X       Y       X NAND Y 0       0          1 0       1          1 1       0          1 1       1          0

If both the inputs are high the output is low.

f. NOR Gate

It is a combination of OR gate and NOT gate.

Page25

Page 26: Unit 1

Digital Logic And Computer Organization

Figure 1.7: NOR Gate

Truth Table

X       Y       X NOR Y 0       0          1 0       1          0 1       0          0 1       1          0

g. XNOR Gate

If both the inputs are same the output is high.

Figure 1.8: XNOR Gate

Truth Table

X       Y       X XNOR Y 0       0          1 0       1          0 1       0          0 1       1          1

For two binary variables (taking values 0 and 1) there are 16 possible functions. The functions involve only three operations which make up Boolean algebra: AND, OR and COMPLEMENT. These operations are like ordinary algebraic operations in that they are commutative, associative and distributive.

Page26

Page 27: Unit 1

Digital Logic And Computer Organization

Figure 1.9: Logical Functions

Half Adder

The logic circuits that perform addition within the Arithmetic and Logic Unit (ALU) of the CPU are called adders. A unit that adds two binary digits is called the half adder and the one that adds together three binary digits is called a full adder. A half adder sums two binary digits to give a sum term (S) and a carry term (C), both being Boolean variables. The truth table for the half adder would be as follows:

X Y S C0011

0 1 0 1

0 1 1 0

0 0 0 1

Figure 1.10: Truth Table for Half Adder.

Figure 1.11: Logic Gate for Half Adder.

Full Adder

Page27

Page 28: Unit 1

Digital Logic And Computer Organization

A half adder logic circuit is an important component of computing systems however as this circuit cannot accept a carry bit from a previous addition it is not enough to fully perform additions for binary number greater than 1. In order to achieve this, a full adder is required. A full adder gives the sum and carry obtained after adding 3 bits.

Figure 1.12: Logic Gate for Full Adder.

Full Adder Logic

From the truth table, the carry bit output is given by the relationship COUT=ABCIN + ABCIN +ABCIN +ABCIN

Since X +X =X, ABCIN can be added to the above expression giving,

COUT=ABCIN + ABCIN +ABCIN +ABCIN+ ABCIN+ ABCIN

Rearranging the terms gives,

COUT=ABCIN + ABCIN + ABCIN +ABCIN +ABCIN+ ABCIN

Page28

Page 29: Unit 1

Digital Logic And Computer Organization

On taking out the common terms,

COUT =BCIN(A+A)+ACIN(B+B)+AB(CIN+CIN)

COUT =ACIN+ BCIN+AB

The full adder logic relationship from the truth table is:

S=ABCIN+ABCIN+ABCIN+ABCIN

Factoring out A

S=A(BCIN+BCIN)+A(BCIN+BCIN) which is,

Assume,

then this can be seen to be another XOR statement,

which can be written as

Subtractors

Binary Subtraction can be done by means of complements. For example, Subtraction of A – B can be done by means of taking 2’s complement of B and adding it to A. The 2’s complement of B is obtained by taking 1’s complement of B and adding 1 to the least significant bit. The 1’s complement is implemented with inverters and one is added to the sum through the input carry.

The addition and subtraction operations can be combined into one common circuit by including an Exclusive-OR gate with each full adder. A 4-bit adder-subtractor circuit is shown in figure 2.13. The mode input M controls the operation. When M = 0 the circuit is an adder and when M = 1 the circuit becomes a subtractor. Each Exclusive-OR gate receives input M and one of the inputs B. When M = 0, B 0 = B. The full-adders receive the value of B, the input carry is 0 and the circuit performs A plus B. When M = 1, B 1 = B´ and C0 = 1 results. The B inputs are all complemented and a 1 is added through the input carry. The circuit performs the operation A plus the 2’s complement of B. For unsigned numbers, this gives A – B if A >= B or the 2’s complement of (B – A) if A<= B.

Page29

B3 A3 B2 A2 B1 A1 B0 A0

Page 30: Unit 1

Digital Logic And Computer Organization

Figure 1.13: Logic Gate for Subtractor

1.2.10 Karnaugh Maps (K-Maps)

Karnaugh or K- maps   are useful tool fot boolean function minimization and for visualization of the boolean function. In brief,

K-maps provide a graphical method for minimizing boolean functions via pattern recognition forup to about n=6 variables.

For larger numbers of variables, there are computer algorithms which can yield near-minimal implementations.

K-maps are a way of expressing truth tables to make minimization easier. They are constructed from minterm codes.

Consider the boolean function

The truth table is

A B f  

0 0 1 m0

0 1 1 m1

1 0 1 m2

1 1 0 m3

The K-map is shown in Figure 1.14. The essence of the K-map is the two dimensional representation of f, which is equivalent to the truth table but more visual. To minimize f, the logical adjacencies are looped out.

Page30

M

FA FA FAC0FA

S0S1S2S3

C1C2C3

C4

Page 31: Unit 1

Digital Logic And Computer Organization

(a)

(b)

Figure 1.14: K-map showing looped-out terms and also corresponding minterms.

Therefore

This is less complex than f in canonical SOP form. Note that looping out logical adjacencies is a graphical alternative to algebraic calculations.

Unit distance code (Gray code.)   For two bits, the Gray code is:

00 01 11 10

Only one bit changes as one goes from left to right. This code preserves logical adjacencies. The K-map method is to loop out groups of 2n logically adjacent minterms. Each looped out group corresponds to a product term in a minimal SOP expression.

1. Loop out single 1s (n=0) which have no logical adjacencies.

Page31

Page 32: Unit 1

Digital Logic And Computer Organization

2. Loop out all pairs of 1s (n=1) which cannot be included in a larger group. 3. Loop out all quads of 1s (n=2) which cannot be included in a larger group etc.

Example. The K-map is shown in Figure 1.15.

Figure 1.15: K-map for . 

Moving left to right or up to down in the K-map changes only one digit in the minterm code. Note the wrap-around at the ends: because of logical adjacency, the top and bottom are joined and the left and right are joined.

n=0: none

n=1:

n=2:

Therefore the minimal SOP representation is

Example :

The K-map is shown in Figure 1.16.

Page32

Page 33: Unit 1

Digital Logic And Computer Organization

Figure 1.16: K-map for

Therefore the minimal SOP representation is

Don't cares.   In some applications it doesn't matter what the output is for certain input values. These are called don't cares.

For instance, in the Binary Coded Decimal   code, not all input values occur:

0 0 0 0 0

0 0 0 1 1

0 0 1 0 2

0 0 1 1 3

0 1 0 0 4

0 1 0 1 5

Page33

Page 34: Unit 1

Digital Logic And Computer Organization

0 1 1 0 6

0 1 1 1 7

1 0 0 0 8

1 0 0 1 9

1 0 1 0 10

1 0 1 1 11

1 1 0 0 12

1 1 0 1 13

1 1 1 0 14

1 1 1 1 15

The decimal numbers are those in the range and a minimum of 4 bits is needed to

encode these. The remaining numbers correspond to code values which are not used in BCD.

The symbols or X are used to denote don't cares. Don't cares can be exploited to help minimize boolean functions.

Example : The K-map is shown in Figure 1.17.

 

Figure 1.17: K-map for .

The minimal SOP representation is

Page34

Page 35: Unit 1

Digital Logic And Computer Organization

1.2.11 The Flip-Flop

One of the basic operations in a computer is the storage and retrieval of data from memory. Part of the electronic component responsible for the storage of data is known as the 'flip-flop'. It can store binary bit either 0 or 1. It has two stable states: HIGH and LOW, that is, 1 and 0. It has the property to remain in one state indefinitely until it is directed by an input signal to switch over to the other state. It is also called bistable multivabrator. It is a basic memory element. The basic flip – flops are S-R Flip – flop, J-K Flip – flop, D Flip – flop, T Flip – flop. For Presetting and Clearing a clocked flip – flop may be required before applying inputs. For this purpose Preset (PR) and Clear (CLR) terminals are provided. PR and CLR are not low at the same time. Preset and Clear are used to initialize a circuit before normal clocked operation of the circuit starts.

Figure 1.18: Basic Flip-Flops

Multivibrators

Two-state devices called multivibrators are used extensively in digital electronics. The bistable multivibrators are called flip-flops and are the basic memory devices used in sequential logic. Other two-state devices include the astable multivibrator, which serves as an oscillator, and the monostable multivibrator ("one-shot" multivibrator), which can serve as a pulse source.

Astable Multivibrator

Astable multivibrator is a two-state device which is not stable in either state. The configuration of NAND gate inverters shown is one of many ways to create an astable multivibrator. If point A is high, then that high voltage charges the capacitor and after a time characteristic of the time constant RC will reach the threshold for switching A low and B high. Then the charging process will reverse until the transition back to the original state occurs. This circuit can be constructed from NAND gate.

Page35

Page 36: Unit 1

Digital Logic And Computer Organization

Figure 1.19: Astable MultivibratorMonostable Multivibrator

In response to a positive trigger pulse the monostable multivibrator or "one-shot" will produce a single output pulse of length t determined by the value of the resistor and capacitor. The non-retriggerable one-shot will not respond to further trigger pulses which happen during its pulse length.

(a) (b)Figure 1.20: (a) Monostable Multivibrator (b) Timing diagram

The logic circuit for the (SR) flip-flop is simple and shows that complex operations in a computer can be built-up from simple components.

Figure 1.21: Logic Circuit for the SR flip-flop

Clocked Set-Reset Flip-flop

Page36

Page 37: Unit 1

Digital Logic And Computer Organization

When the signal line S goes high, the other line to the NAND gate from the pulse steering circuit must also be high for it to generate a low output. Likewise, a clock pulse must have the reset NAND gate high to receive a high RESET pulse. Therefore all transitions are synchronized to the clock.

Figure 1.22: Clocked Set-Reset Flip-flop

Pulse-Steering Circuit

In order to add clock synchronization to a flip-flop, a ciruit is used to apply the clock pulses to the flip-flop. To convert a NAND gate latch to a clocked S/R flip-flop, two NAND gates may be used as above left to enable an input pulse on either the S or R lines to trigger a transition.

Figure 1.23: Set-Reset Flip-flop clock pulses

Resetting the NAND Latch

The NAND latches are reset as shown below in the figure 1.24(a) . The time sequence in figure 1.24(b) shows the conditions under which the set and reset inputs cause a state change and when they don't.

Page37

Page 38: Unit 1

Digital Logic And Computer Organization

(a) (b)

Figure 1.24: (a) Resetting NAND Gate (b) Timing Diagram

Clocked D Flip-Flop

A D flip-flop constructed from a NAND-latch. The D flip-flop tries to follow the input D but cannot make the required transitions unless it is enabled by the clock. Note that if the clock is low when a transition in D occurs, the tracking transition in Q occurs at the next upward transition of the clock.

(a) (b)

Figure 1.25: (a) D-Flip-Flop (b) Clocked D Flip-flop

Page38

Page 39: Unit 1

Digital Logic And Computer Organization

Figure 1.26: (a) D-Flip-Flop (b) Clocked D Flip-flop

T Flip Flop

The T Flip-Flop is obtained from a JK flip-flop when J and K are connected to provide a single input designated by T. The T flip-flop therefore has only to conditions. When T = 0 (J=K=0) a clock transition does not change the state of the flip-flop. When T = 1 (J=K=1) a clock transition complements the state of the flip-flop. These conditions can be expressed by a characteristic equation:

Q (t – 1) = Q(t) T

J-K Flip-Flop

The J-K flip-flop is the most versatile of the basic flip-flops. It has the input- following character of the clocked D flip-flop but has two inputs,traditionally labeled J and K. If J and K are different then the output Q takes the value of J at the next clock edge. The outputs feed back to the enabling NAND gates. This is what gives the toggling action when J=K=1 If J and K are both low then no change occurs. If J and K are both high at the clock edge then the output will toggle from one state to the other. It can perform the functions of the set/reset flip-flop and has the advantage that there are no ambiguous

Page39

J Q

>C

K

J K Q(t + 1)

0 0 Q(t) No Change0 1 0 Clear to 01 0 1 Set to 11 1 Q´(t) Complement

T Q

>C

J Q(t + 1)

0 Q(t) No Change1 Q´(t) Complement

Page 40: Unit 1

Digital Logic And Computer Organization

states. It can also act as a T flip-flop to accomplish toggling action if J and K are tied together. This toggle application finds extensive use in binary counters.

(a) (b)

(c)

Figure 1.27: (a) J-K Flip Flop circuit (b) Truth Table (c) J-K Flip-Flop with clock

Switching Example - J-K Flip-Flop

The positive going transition (PGT) of the clock enables the switching of the output Q. The "enable" condition does not persist through the entire positive phase of the clock. The J & K inputs alone cannot cause a transition, but their values at the time of the PGT determine the output according to the truth table. This is an application of the J-K flip-flop.

(a)

Page40

Page 41: Unit 1

Digital Logic And Computer Organization

(b) Figure 1.28: (a) Clock J-K Flip Flop (b) Timing Diagram

J-K Flip-Flop Data Transfer

In synchronous data transfer between two J-K flip-flops, a transfer signal on the clock put causes transfer from cell A to cell B. The transfer signal could be applied to several such cells in series to create a shift register.

(a) (b)

Figure 1.29: Truth Table for J-K Flip Flop

In asynchronous data transfer, a transfer pulse may be applied at any time to force the data onto the asynchronous set and clear inputs, storing the data regardless of what is happening on the other inputs.

NAND-gate Latch

The concept of a "latch" circuit is important to creating memory devices. The function of such a circuit is to "latch" the value created by the input signal to the device and hold that value until some other signal changes it.

Page41

Page 42: Unit 1

Digital Logic And Computer Organization

Figure 1.30: NAND Gate Latch

Setting and Resetting the NAND Latch

After being set to Q=1 by the low pulse at S (NAND gate function), the restored normal value S=1 is consistent witht the Q=1 state, so it is stable. Another negative pulse on S gives which does not switch the flip-flop, so it ignores further input.

(a)

(b)

Figure 1.31: (a) Setting NAND Gate Latch (b) Resetting NAND Gate Latch

Page42

Page 43: Unit 1

Digital Logic And Computer Organization

1.3) Revision Points

In binary coding, every symbol, which appears in the data, is represented by a group of bits

The group of bits used to represent a symbol is called a byte. Most modern computers use 8 bits to represent a symbol. Hence, the term byte is commonly used to mean a group of 8 bits.

The commonly used computer codes for internal representation of data are BCD, EBCDIC, ASCII

BCD( Binary Coded Decimal) is a 6- bit code, which can represent 64 different characters.

EBCDIC(Extended Binary- coded Decimal Interchange Code) is an 8- bit code which can represent 256 different characters.

ASCII(American Standard Code for Information Interchange) is one of the most popular computer codes. It is of two types – ASCII -7 and ASCII-8. ASCII-7 is a 7- bit code which can represent 128 different characters and ASCII_8 is an 8-bit code, which can represent 256 different characters.

Negative numbers can be represented by:1. Signed- magnitude form2. 1’s Complement form3. 2’s Complement Form

1.4) Intext Questions

1. What is the difference between a positional and a non-positional number system?

2. A new computer code is designed, which uses 10 bits. How many different characters are possible in this code?

3. Write short notes on: 1.ASCII 2.BCD 3.EBCDIC 4.Hexadecimal notation & 5.Octal Notation

4. What is the exact number of bytes in a system that contains 1. 32KB 2. 64 MB 3. 12.8 GB

1.5) Summary

Number systems are basically of two types: non-positional and positional. In all the number systems, the value of the base determines the total number of

different symbols or digits available in the number system. The decimal number system has the digits from 0 to 9 and the numbers have a

base ten. The binary number system has only two symbols or digits (0 and 1) that can be

used with the base 2.

Page43

Page 44: Unit 1

Digital Logic And Computer Organization

In the octal number system the base is 8. In this system, there are only eight symbols or digits: 0,1,2,3,4,5,6 and 7.

In the hexadecimal number system the base is 16. In this system, there are only 16 symbols or digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.

It is convenient to use Gray code to represent the digital data when it is converted from analog data. The advantage of Gray code over the straight binary number sequence is that only one bit in the code group changes when going from one number to the next.

Data in a computer is stored in a series of bits which are often interpreted in blocks known as bytes [8 bits], words [2, 4 or 8 bytes].

Computer Logic is based on Boolean Algebra and it is possible to combine such operations into complex logical expressions.

A Boolean variable has one of two values often referred to as TRUE or FALSE. There are two important means to express the relationship between input and

output variables of a digital system: truth table and Boolean expression. The term ‘Gate’ is used to describe the members of a set of basic electronic

components which, when combined with each other, are able to perform complex logical and arithmetic operations.

'Gates' are the physical realization of the simple Boolean expressions. For two binary variables (taking values 0 and 1) there are 16 possible functions,

that involve only three operations which make up Boolean algebra: AND, OR and COMPLEMENT.

One of the most widely used representations of numerical data is the binary coded decimal (BCD) form in which a 4-bit binary number represents each integer of a decimal number.

The logic circuits that perform addition within the Arithmetic and Logic Unit (ALU) of the CPU are called adders.

Part of the electronic component responsible for the storage of data is known as the 'flip-flop'.

1.6) Terminal Exercises

1. Find out the octal equivalents of the following binary numbers:2. (a) 1101011 (b) 1000

3. Find out the hexadecimal equivalents of the following binary numbers:4. (a) 11010010 (b) 110001

5. Convert the following numbers to decimal:6. (a) 2A3B16 (b) 12349

7. Convert the following decimal numbers to binary:

8. (a) 43510 (b) 3210

Page44

Page 45: Unit 1

Digital Logic And Computer Organization

9. Explain the Boolean theorems.

10. Describe the various types of logic gates with circuits and truth tables.

11. Explain the functionality of Half adder and Full adder.

12. Explain the types of multi-vibrators.

13. Explain the Clocked Set-Reset flip-flop in detail.

14. Explain the J-K flip-flop in detail.

15. Explain the D flip-flop in detail.

1.7) Supplementary Materials

1. Digital Design, M. Morris Mano, Pearson Education Asia

1.8) Assignments

Conversions from one representation to another can be given

1.9) Reference Books

1. Computer Engineering: Hardware Design, M>Morris; Mano, Prentice- Hall

1.10) Learning Activities

Convert decimal +71 and + 67 to binary using the signed- 2’s complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of (+71) + (-67), (-71)+ (+67) (-71 + (-67). Convert the answers back to decimal and verify that they are correct.

1.11) Keywords

Bit Byte Signed – magnitude form 1’s Complement form 2’s Complement Form Flip-flop Register

Page45