Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

Size: px
Start display at page:

Download "Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction"

Transcription

1 Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers Binary-to-Decimal conversion Decimal-to-Binary Conversion 2.4 Octal Numbers Octal-to-Binary Conversion Binary-to-Octal Conversion Octal-to-Decimal Conversion Decimal-to-Octal conversion 2.5 Hexadecimal Numbers Hexadecimal-to-Binary Conversion Binary-to-Hexadecimal Conversion Hexadecimal-to-Decimal Conversion Decimal-to-Hexadecimal Conversion Octal to Hexadecimal Conversion Hexadecimal to Octal Conversion 2.6 Arithmetic Operation s and 2 s Complement Subtraction using 1 s complement Subtraction using 2 s complement s and 10 s Complement Subtraction using 9,s complement Subtraction using 10 s complement 2.9 Codes BCD code Excess-3 code Gray code 2.10 Unit Summary 1.1 Introduction The study of number system begins with the familiar decimal number system. The decimal number system consists of ten unique digits 0 to 9. So, its base/radix is 10 (since it involves with 10 symbols).the digits 0 to 9 are used to specify any number. Computers and other digital circuits don t process decimal numbers. They work with binary numbers which consists of only two digits 0&1.This creates a problem. Because to represent larger decimal quantities, a very long binary number is required. So to compress this long string of binary numbers, octal & hexadecimal number systems are widely used in digital systems.so the knowledge of these number systems is very essential for understanding, analyzing and designing of digital systems.

2 This unit discuss about the decimal, binary, octal and hexadecimal numbers. The inter conversion of these number systems are also explained here. Different types of codes, which are commonly used in digital systems and microprocessors have also been discussed in this unit. 1.2 Objectives After going through this unit you will be able to: i) Explain different types of number system (Binary, Decimal, and Octal & Hexadecimal) ii) Convert one number system to another iii) Appreciate binary arithmetic operation iv) Define complements (1 s, 2 s, 9 s & 10 s complement) v) Apply use of complements in subtraction vi) Explain different types of codes and convert a code to binary and vice versa. 2.3 Binary Numbers Binary number system is extensively used in digital electronics since it uses only one two symbols 1 & 0. These two digits represent the two voltage levels high or low in digital electronics. The base (radix) of the binary number system is 2. It is a positional system, i.e., every position is assigned a specific weight. In digital system each binary digit is called a bit A group of 4 bit is called nibble A group of 8 bit is called byte

3 Representation of Decimal and Binary numbers The following table represents the decimal number and its corresponding binary number Decimal Number Binary Number B3 B2 B1 B ` Binary to decimal conversion Binary numbers can be converted into a decimal number by multiplying by the binary numbers 1 or 0 by their positional weight and adding the product. Convert the binary number to its decimal equivalent Binary Number Conversation of Binary to decimal 1x2 4 +1x2 3 +0x2 2 +1x2 1 +0x2 0 = =26 Decimal Equivalent Decimal to Binary conversion Any decimal numbers can be converted into its equivalent binary numbers by successive division by 2 and keeping the track of the reminders. The division is continued till the quotient is 0. The number read from bottom to top gives the equivalent binary number.

4 For example Convert 26 to its binary equivalent Decimal Number Quotient Remainder Binary Equivalent 26/ MSB (26) 10 13/ / / /2 0 1-LSB (11010) The decimal fraction is converted to binary fraction by successive multiplication by 2 and keeping the track of integers generated. The multiplication is continuities till the fraction part of the product is 0. The integers read from top to bottom to get the binary equivalent. For example Convert to its binary equivalent Decimal Number Generated Integer 0.625x MSB 0.250x x LSB 0.000x Binary Equivalent 0.101

5 Self Check Exercise-1 A. For Q No. 1-5 select the most appropriate alternative from among the four alternatives given below each question 1. The digital systems usually operate on system. a) Binary b) decimalc) octal d) hexadecimal 2. The binary system uses power of for positional values. a) 2 b) 8 c) 16 d) After counting 0, 1, 10, 11, the next binary number is a) 12 b) 100 c) 101 d) The number 1000 is equivalent to decimal number a) one thousand b) eight c) four d) sixteen 5. In binary numbers, shifting the binary point one place to the right a) Multiplies by 2 b) divides by 2 c) Decreases by 2 d) increases by 10 B. Answer the following questions 6. Convert the following decimal numbers to their binary equivalents: a) 167 b) c) 52 d) How do you convert a decimal number to an equivalent number in any other base system? 2.4 Octal Numbers The base or( radix) of the octal number system is 8.This number system uses 8 different symbols 0,1,2,3,4,5,6,7. Each significant position in an octal no. system has a positional weight. These weights are given in the ascending powers of 8, i.e 8 0, 8 1, 8 2,.etc. respectively. The binary equivalent of an octal no. must be a group of 3 bits word, since the base of octal no. system is 8=2 3.

6 2.4.1Octal to Binary conversion Octal numbers can be converted into equivalent binary numbers by replacing each octal digit by its 3 bit equivalent binary. Example: convert (3702) 8 to a binary number. (3702) 8 = The number (3702) 8 = ( ) 2 = ( ) 2 On the most significant digit, leading zeros can be suppressed.i.e. 3 can be written as 11 instead of Binary to octal conversion To convert from binary to octal back, the reverse procedure is used.i.e. divide the whole binary string into groups of 3 bits. Then starting from LSB and moving towards MSB, convert each group of 3 bits into the corresponding octal digit. Convert ( ) 2 to an octal number. Solution: Therefore ( ) 2 = (2537) Octal to decimal conversion Any octal number can be converted into its equivalent decimal number by multiplying each digit of the octal number by the weight of its position and then adding the products. Example Convert ( ) 8 into its equivalent decimal number. Solution ( ) 8 =4 x x x x x x 8-2

7 = = ( ) Decimal to octal conversion The octal equivalent of a decimal no. can be obtained by dividing a given decimal number by 8 repeatedly until a quotient 0 is obtained. The process is exactly the same as the method explained earlier. The following example illustrates the conversion from decimal to octal. Convert ( ) 10 to octal no. Integer Part Quotient Reminder Octal Equivalent 115/ MSB /8 1 6 (163) 8 1/8 0 1 LSB Fractional Part (0.1875) 10 Result Integral Part Octal Equivalent x x (0.14) 8 Therefore ( ) 10 = (163.14) 8 Self Check Exercise 2 A. For Q No select the most appropriate alternative from among the four alternatives given below each question 8. The number 12 8 is equivalent to decimal a) 12 b) 20 c) 10 d) 4 9. The number is equivalent to octal a) 54 b) 45 c) 37 d) The number 17 8 is equivalent to binary a) 11 b) 1110 c) d) 1111

8 11. Which of the following is NOT an octal number? a) 19 b) 77 c) 15 d) 101 B. Answer the following questions 12. Convert each of the octal numbers to binary. a)15 8 b) c) d) Convert the following decimal no. to octal no. then to binary. a)59 b) 0.58 c) 64.2 d) Hexadecimal Numbers The hexadecimal number system is the most popular means of direct data entry and retrieval in digital system. The base of hexadecimal number system is 16 and uses 16 symbols, namely, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The symbol A to F represents the decimal 10 to 15 respectively. Since its base is 16= 2 4, every 4 bit binary digit combination can be represented by one hexadecimal digit. Each significant position in an hexadecimal number has a positional weight. These weights are given in the ascending powers of 16. i.e., 16 0, 16 1, 16 2,. etc Hexadecimal-to-binary conversion The conversion of Hexadecimal to Binary is the reverse process of conversion from Binary to Hexadecimal as explained above. i.e. each hexdigit is replaced by its 4-bit binary group. For example Convert (2DAC) 16 to Binary (2DAC) 16 = 2 D A C = ( ) 2

9 2.5.2 Binary to hexadecimal conversion To convert a binary no. to a hexadecimal no., divide the whole binary string in to groups of 4 bits each and then replace each 4 bit group by the equivalent hexadecimal digit For example Convert ( ) 2 to hexadecimal no. ( ) 2 = = 2 A 4 = (2A4) Hexadecimal to decimal conversion To Convert a Hexadecimal number to Decimal multiply each digit in the Hex no. by its position weight and take the summation of all these product terms Convert to (5A6) 16 to Decimal (5A6) 16 = 5 x x x 16 0 = = (1446) Decimal to hexadecimal conversion A decimal no. can be converted to Hexadecimal no. by successively dividing the given decimal no. by 16 till the quotient is 0. Convert (2598) 10 to Hexadecimal Decimal Number (2598) 10 Quotient Remainder in Decimal Hexadecimal No. 2898/ / / A Hexadecimal Equivalent (A326) 16 Therefore (2598) 10 = (A326) 16

10 2.5.5 Octal to hexadecimal conversion To convert an octal no. to hexadecimal the easiest method is to first convert the hex no. to its binary equivalent and then the binary no. to hexadecimal. It will be clear from the example given below. : Convert ( ) 8 to hexadecimal no. ( ) 8 = = For the integer part, group the binary bits into 4 from LSB to MSB and for the fractional part group the bits from the MSB to LSB ( ) 8 = = 1 E E = (1EE.810) Hexadecimal to octal conversion To convert a hexadecimal no. to octal, the simple way is to first convert binary no. to octal. : Convert (56) 16 to Octal no. (56) 16 = = ( ) 2 = = = (126) 8 Self Check Exercise 3 A. For Q No , Select the most appropriate alternative from among the four alternatives given below each question 14. The radix/base of the hexadecimal no. system is a)10 b)16 c) 8 d) The symbol E represents the decimal a)13 b)15 c) 14 d) The number 2D 16 is equivalent to binary

11 a) b) c) d) Hexadecimal number system is used as a shorthand language for representing numbers. a) decimal b)binary c) octal d) large 18.The binary equivalent of A 16 is a)1010 b) 1011 c) 1000 d) The number is equivalent to octal a) 701 b) 137 c) 401 d) 107 B. Answer the following questions 20. What are the advantages of a a) Binary no. system b) Hexadecimal no. system 21. Convert the following hexadecimal numbers to binary. a) b) c) 4BAC 16 d) 3A9.BD Arithmetic Operation Binary arithmetic is much simpler than decimal arithmetic because here only two digits 0&1 are involved. Arithmetic operations in a computer are done in its arithmetic unit by using binary numbers. The basic arithmetic operations are, addition,subtraction, multiplication,division. These operations are performed by digital logic circuits called the adder, sub tractor, multiplier and divider. The arithmetic rules for Addition, Subtraction, Multiplication, and Division of binary numbers are given below. Addition Subtraction Multiplication Division 0+0=0 0-0=0 0 x 0=0 0/1=0 0+1=1 1-0=0 0 x 1=0 1/1=1 1+0=1 1-1=0 1 x 0=0 0/0=0 1+1= =1 1 x 1=1 1/0=not allowed

12 Self Check exercise 4 A. For Q No Select the most appropriate alternative from among the four alternatives given below each question 22. The binary addition gives a) 111 b) 10 c) 110 d) The cumulative addition of the four binary bits ( ) gives a) 1111 b) 111 c) 100 d) The result of binary subtraction ( ) is a) 111 c) 111 c) 011 d) The result of binary multiplication x 102 is a) 1101 b) 0110 c) 1001 d) The binary division /100 2 gives a) 110 b) 1100 c) 11 d) 101 B. Answer the following questions 27. Subtract the following groups of binary numbers. a) b) c) Add the following groups of binary numbers using the binary addition method. a) b) c) s and 2 s Complement There are two complement forms used in digital systems to represent signed numbers. These are 1 s complement and 2 s complement form. These two forms are used to represent negative numbers. Most digital computers do subtraction by the 2 s complement method.the advantage of performing subtraction by the complement method is reduction in the hardware. Instead of having separate digital circuits for addition and subtraction, only adding circuits are needed.i.e. subtraction is also performed by adders only. To take the 1 s complement of a binary no., simply change all 1 s to 0s and all 0 s to 1s

13 The 1 s complement of is Similarly the 2 s complement of a binary no. can be obtained by adding 1 to its 1 s complement Find the 2 s complement of s complement of 10110= For obtaining 2 s complement of 10110, you have to add 1 to 01001(1 s complement of 10110) i.e, = Subtraction using 1 s complement The subtraction using 1 s complement can be obtained by the following methods: Take the 1 s complement of the subtrahend (smaller number). Add this to the minuend (larger number). If a carry is generated, it indicates that the answer is positive. Add the carry to the result. This carry is called the end-around carry (EAC). If no carry is generated, then the answer is negative. Take the 1 s complement of the original addition and change the sign. 1 Subtract (1011) 2 from (1110) 2 using 1 s complement method (+) 1 s complement Carry Add Carry The answer is (0011) 2

14 2 Subtract (11000) 2 from (101) 2 using 1 s complement method (+) 1 s complement No carry The answer is ve, since no carry is obtained. Si the answer is the 1 s complement of the and is in opposite sign i.e, Subtraction using 2 s complement 2 s complement subtraction can be obtained by the following methods. Take the 2 s complement of the subtrahend (smaller number). Add it to the minuend (larger number). Presence of a Carry indicates that the answer is positive. Omit the carry. Absence of a carry indicates that the answer is negative. Take the 2 s complement of the original addition and change the sign. Subtract (1011) 2 from (1110) 2 using 2 s complement method (+) 2 s complement Carry The carry is ignored. Thus the answer is (0011) 2 2 Subtract ( from (1000) 2 using 2 s complement method (+) 2 s complement No Carry No carry is obtained. The answer is the 2 s complement of (1110) 2 and is in opposite sign. i.e, -(0010) 2

15 2.8 9 s and 10 s Complement 9 s complement The 9 s complement of a decimal number can be obtained by subtracting each digit in the number from 9,i.e a digit plus its 9 s complement equals to 9. The 9 s complement of decimal digits 0 to 9 are listed below. Decimal No. 9 s Complement Find the 9 scomplement of each of the following decimal no.s a) 15 b)135 Subtract each digit in the no. from 9 to get the 9 s complement a) = 84 (9 s complement of 15) b) = 864 (9 s complement of 135) 10 s complement The 10 s complement of a decimal no. i equal to its 9 s complement + 1 Convert the following decimal no. in to its 10 s complement form a) 18 b) 152 a) 99-18= 81 (9 s complement of 18) 81+1= 82(10 s complement of 18) b) = 847 (9 s complement of 152) = 848 (10 s complement of 152)

16 2.8.1 Subtraction using 9 s complement Subtraction of a smaller number from a larger number using 9 s complement Steps: Take the 9 s complement of the smaller number Add the 9 s complement to the larger number Carry indicates that the answer is positive. Add the carry to the list significant digit If there is no carry the answer is negative. Take the 9 s complement of the result and change the sign Subtract 143 from 363 using 9 s complement Direction Subtraction 9 s complement subtraction s complement of Carry Add carry to the result = 220 The answer is positive. i.e, 220 Subtract 745 from 245 using 9 s complement Direction Subtraction 9 s complement subtraction s complement of Carry s complement of 499 = = 500 No carry indicates that the answer is negative. i.e, -500

17 2.8.2 Subtraction using 10 s complement It is analogous to the often used 2 s complement method in binary subtraction. In this method the minuend is added to the 10 s complement of the subtrahend and the carry is ignored. a) Subtract 54 from 88 using 10 s complement method Direction Subtraction 10 s complement subtraction s complement of Carry 1 34 Ignore the carry. The answer is positive i.e, 34 b) Subtract 813 from 432 using 10 s complement method Direction Subtraction 10 s complement subtraction s complement of Carry s complement of 619 = 381 Since there is no carry, the answer is negative. i.e, -381 Self Check Exercise 5 A. For Q No select the most appropriate alternative from among the four alternatives given below each question 29. The chief reason why digital computers use complemental subtraction is that it a) Simplifies their circuitry b) is a very simple process c) can handle negative numbers easily. d) Avoids direct subtraction 30. The 1 s complement of is a) 0110 b) 0101 c) 1110 d) 0011

18 31. The 2 s complement of is a) 0111 b) 0101 c) 1000 d) The 9 s complement of 19 is a) 91 b) 99 c) 80 d) The 10 s complement of 46 is a) 54 b) 53 c) 45 d) 35 B. Answer the following questions 34. How can negative no be represented? Distinguish between 1 s complement and 2 s complement 35.Distinguish between 9 s complement and 10 s complement? 2.9 Codes We are very comfortable with the decimal number system, but digital systems like computers & other digital circuits process the data in the binary format. So various binary codes are used to represent the data. A code is a symbolic representation of discrete information, which may be present in the form of numbers, letters or physical quantities. The information used in every code is represented in binary form. The binary code can be classified into two types of codes, i.e. numeric codes and alphanumeric codes. Alphanumeric codes represent alphanumeric information, i.e. letters of the alphabet, and decimal numbers as a sequence of 0s and 1s. An example of alphanumeric cod e is the ASCII code (American Standard Code for Information Interchange). Numeric code represents numeric information, i.e. only numbers as a series of 0s and 1s.An example of the numeric code is the Binary coded decimal (BCD) code which is used to represent decimal digits. Codes are also used for error detection and error correction purpose. Since when digital signals are transmitted from one location to another location, errors may occur due to electrical noise. Various types of codes are discussed below.

19 2.9.1 BCD (or) 8421 code A Binary Coded Decimal (BCD) is one in which, decimal digits are encoded by their natural binary equivalents-one at a time-into groups of four bits. For example (25) 10 is represented by [ ] using BCD code, rather than (10001) 2. It is a positional weight code. Each position of a number represents a specific weight. These codes are also known as 8421 code or simply BCD code. The number 8421 indicates the binary weights of the four bits. i.e. the weights of the first (right most) position is 2 0 =1, 2 1 =2, 2 2 =4, 2 3 =8.Replacing from left to right, the weights are ,and hence it is called 8421 code. The disadvantage of BCD code is that it requires more no. of bits to code a decimal number. But the ease of conversion between the BCD code to decimal number and vice versa is the main advantage of this code, which makes it useful and popular code for input,output operations in digital systems.to convert any decimal number in to BCD,each decimal digit should be replaced by the appropriate 4-bit code. The following table summarizes the binary and BCD codes for the decimal numbers 0 to 15. Decimal numbers Binary number Binary Coded Decimal(BCD)

20 Convert (3906) 10 to BCD Therefore (3906) 10 = Note: Leafing zeros are added to ensure that each digit is represented by four bits.the leading zeros can be suppressed on the most significant digit. Conversion flow chart HEXADECIMAL BINARY DECIMAL OCTAL BCD The flow chart summarizes the conversions that have been discussed so far. There is no line directing from octal to BCD,because that direct conversion was not presented. To convert from octal to BCD, convert to binary, then decimal, then BCD Excess-3 code The XS-3 code is a non-weight code. This means each position with in a binary number isn t assigned affixed value. This code is a self complementing code, which

21 means 1 s complement of the coded number yields 9 s complement of the number itself. As the name indicates, XS-3 code represents a decimal number,in binary form, as a number greater than 3. An XS-3 code is obtained by adding 3 to a decimal number, then convert it into its equivalent BCD code. : A decimal 4 can be coded, by adding 3 into4; in order to obtain 7.7 is then encoded in its equivalent 4 bit binary code So 0111 is the XS-3 code of the decimal number 4. Or it can also be obtained directly in another way by adding binary equivalent of 3 to the natural BCD code of the digit. i.e. Decimal 4 is coded as =0111 in XS-3 code. Convert (463) 10 into its XS-3 code. Given decimal number Add 3 to each bit Sum Converting the above sum into its BCD code, we have Sum BCD Hence, the XS-3 code for (463) 10 is The following table summarizes the BCD, XS-3 code and 9 s complement representation for decimal digits. Decimal BCD code XS-3 code 9 s complement

22 Gray codes The gray code isn t a weighted code and isn t suitable for arithmetic operations, but finds application in input/output devices and in some types of analog to digital converters. Gray code is a cyclic code which has a special property of containing two successive code words differ in one bit position only, i.e. it is a unit distance code. It is also called as the reflected code. Conversion of a binary number to gray code Keep the first bit of the gray code is the same as the first bit of the binary number. The second bit of the gray code equals to the sum of first and second bit of the binary number. Discard the carry if it is generated from the sum. The third bit of the gray cod equals to the sum of second and third bit of the binary number and so on. Example: Convert the binary (110010) 2 to its gray code. Solution: [Binary] [Graycode] Conversion from gray code to binary Conversion of a Gray code into its binary form involves the reverse of the procedure as given below i) The first binary bit (MSB) is the same as that of the first Gray code bit ii) If the second Gray bit is zero, the second binary bit is the inverse of its first binary bit. iii) Step 2 is repeated for each successive bit

23 Convert [ ] G to binary Solution: Gray Binary Therefore [ ] G = [ ] 2 Self Check Exercise 6 A. For Q No Select the most appropriate alternative from among the four alternatives given below each question 36. BCD code is a) non-weighted code b) the same thing as binary numbers c) a binary code d) an alphanumeric code 37. Which of the following 4-bit combinations is/are invalid in the BCD code? a) 1010 b) 0010 c) 0101 d) In XS-3 code each coded number is than in BCD a) four larger b) three smaller c) three larger d) much larger 39. The XS-3 code of is a) 1001 b) 1000 c) 1001 d) Gray code is a) non-weighted code b) weight code c) a binary code d) an alphanumeric code 41. The gray code of is a) 1000 b) 1001 c) 0101 d) 0100

24 B. Answer the following questions 42. What is a BCD code? What are its advantages and disadvantages? 43. Define the XS-3 code and gray code. Why these are important? 2.9 Unit Summary This unit explains the various number systems, which are widely used in digital systems. The general properties of number system, methods of conversion from one number system to another and the rules of arithmetic operations are discussed. Various complement methods like 1 s complement, 2 s complement, 9 s complement& 10 s complement are introduced to make the subtraction easier. With the application of these methods the subtraction can be achieved by adding the complement of the subtrahend to the minuend. Different codes are used in digital systems which may be in the form of numbers, letters or physical quantities. Some of the more commonly used codes like BCD, XS-3Code, gray code are introduced. The knowledge of these number systems & codes is very essential for the effective understanding of digital systems Answers to Check Your Progress 1. (a) 2. (a) 3. (b) 4. (b) 5. (a) 6. a) b) c) d) A decimal number can be converted to an equivalent no. in any other base system with the base b by successively dividing the decimal no by b. In this method, the reminders are read from bottom to top. Similarly a decimal fraction can be converted to an equivalent no. in any other base system with the base b by successively multiplying the decimal no by b. In this method, the integers to the left of the radix point are read from top to bottom. 8). (c) 9. (b) 10. (d) 11. (a) 12. a) b) c) d) a ) b) c) d)

25 14. (a) 15. (c) 16. (a) 17. (a) 18.(a) 19. (d) 20. The advantages of binary no. system is that, it is very simple, because it consists of only two digits, i.e.0&1. So it is useful in digital computers,since the switching circuits used in these computers use two state devices such as transistors,diodes etc. Hexadecimal no. systems are used to compress the long strings of binary numbers.it is the most popular means of direct data entry and retrieval in digital systems. 21. a ) b) c) d) (d) 23. (c) 24. (d) 25. (d) 26. (a) 27.a) 0011 b) c) a) b) c) (a) 30. (b) 31. (c) 32. (c) 33. (a) 34.Negative numbers can be represented in sign magnitude form,i.e. MSB represents the sign bit (0 for positive and 1 for negative) and the remaining bits represent the magnitude of the no. Negative numbers can also be represented by the 1 s complement form, or in 2 s complement form 1 s complement can be easily obtained using an inverter. The 2 s complement can be obtained by first obtaining the 1 s complement and then adding (1) to it 35. The 9 s complement of a decimal no. can be obtained by subtracting each digit of that decimal no. from 9. The 10 s complement of a decimal no. is obtained by adding a 1 to its 9 s complement. 36. (c) 37. (a) 38. (c) 39. (b) 40. (a) 41. (d) 42. The BCD code uses the binary no. system to specify the decimal numbers 0 to 9. In this code each decimal digit, 0 through 9 is coded by 4-bit binary no. It is also called as the 8421 code. The main advantage of this code is its ease of conversion to and from decimal and the disadvantage of this BCD code is that, arithmetic

26 operations are more complex then they are in pure binary. It is less efficient than the pure binary, in the sence that it requires more bits. 43. A XS-3 code is a BCD code formed by adding 3(0011) to the binary equivalent of the decimal no. A Gray code is one, in which only one bit changes between successive numbers. It is also called a unit distance code The XS-3 code helps in computing mathematical operations in digital computers. The Gray code is useful for its ease of conversion to and from binary. It is used in instrumentation and data acquisition systems where linear or angular displacement is measured. It is used in I/O devices, A/D converters and other peripheral devices. References Bignell, J and Donovan, R. (1989) Digital Electronics, Delmar Publishers Inc. New York Jain, R. P. (2007) Modern Digital Electronics; Third Edition; Tata McGraw-Hill Publishing Company Limited; New Delhi Kumar, A. A. (2004) Fundamentals of Digital Circuits; Seventh Edition; Eastern Economy Editions; Prentice- Hall India Pvt. Ltd; New Delhi Mano, M. M. (2006) digital Logic and Computer Design; Second Edition; Eastern Economy Editions; Prentice- Hall India Pvt. Ltd; New Delhi Malbert, A. B. and Leach, D. P. (1993) Digital Principles and Applications, Tata Mc Graw hill Publishing Company Limited, New Delhi Salivahanan, S. and Arivazhagan, S. (2006) Digital Circuits and Design, Vikas Publishing House Pvt Ltd, Delhi Srinivasan, P. (2007) National Programme Technology Enhanced Learning Video Lectures on Introduction to Digital Circuits and System. Lecture I & II

27 Unit End Exercise 1. State the common features between different number system. 2. What are meant by 1 s and 2 s complement of a binary number? 3. Explain the rules for binary subtraction using 1 s and 2 s complement methods. 4. Compare BCD and Binary systems of coding 5. How do you convert a binary number to a Gray number and vice versa.

BINARY SYSTEM. Binary system is used in digital systems because it is:

BINARY SYSTEM. Binary system is used in digital systems because it is: CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted

More information

CHW 261: Logic Design

CHW 261: Logic Design CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER

More information

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System Moodle 1 WILLINGDON COLLEGE SANGLI ELECTRONICS (B. Sc.-I) Introduction to Number System E L E C T R O N I C S Introduction to Number System and Codes Moodle developed By Dr. S. R. Kumbhar Department of

More information

Chapter 1 Review of Number Systems

Chapter 1 Review of Number Systems 1.1 Introduction Chapter 1 Review of Number Systems Before the inception of digital computers, the only number system that was in common use is the decimal number system which has a total of 10 digits

More information

Review of Number Systems

Review of Number Systems Review of Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer.

More information

Digital Systems and Binary Numbers

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

More information

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

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

More information

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc. Chapter 3: Number Systems and Codes Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc., 5 th edition Decimal System The radix or base of a number system determines

More information

NUMBER SYSTEMS AND CODES

NUMBER SYSTEMS AND CODES C H A P T E R 69 Learning Objectives Number Systems The Decimal Number System Binary Number System Binary to Decimal Conversion Binary Fractions Double-Dadd Method Decimal to Binary Conversion Shifting

More information

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

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

More information

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) NUMBER SYSTEM A considerable subset of digital systems deals with arithmetic operations. To understand the

More information

MACHINE LEVEL REPRESENTATION OF DATA

MACHINE LEVEL REPRESENTATION OF DATA MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems

More information

Lecture (02) Operations on numbering systems

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

More information

Numbering systems. Dr Abu Arqoub

Numbering systems. Dr Abu Arqoub Numbering systems The decimal numbering system is widely used, because the people Accustomed (معتاد) to use the hand fingers in their counting. But with the development of the computer science another

More information

CHAPTER 2 (b) : AND CODES

CHAPTER 2 (b) : AND CODES DKT 122 / 3 DIGITAL SYSTEMS 1 CHAPTER 2 (b) : NUMBER SYSTEMS OPERATION AND CODES m.rizal@unimap.edu.my sitizarina@unimap.edu.my DECIMAL VALUE OF SIGNED NUMBERS SIGN-MAGNITUDE: Decimal values of +ve & -ve

More information

Chapter 2: Number Systems

Chapter 2: Number Systems Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This two-valued number system is called binary. As presented earlier, there are many

More information

Binary Codes. Dr. Mudathir A. Fagiri

Binary Codes. Dr. Mudathir A. Fagiri Binary Codes Dr. Mudathir A. Fagiri Binary System The following are some of the technical terms used in binary system: Bit: It is the smallest unit of information used in a computer system. It can either

More information

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects: Numeral Systems -Numeral System -Positional systems -Decimal -Binary -Octal Subjects: Introduction A numeral system (or system of numeration) is a writing system for expressing numbers, that is a mathematical

More information

Lecture 2: Number Systems

Lecture 2: Number Systems Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University Contents

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 1 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009 Analog Quantities Most natural quantities

More information

Korea University of Technology and Education

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

More information

Computer Organization

Computer Organization Computer Organization Register Transfer Logic Number System Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5,

More information

Binary Systems and Codes

Binary Systems and Codes 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010

More information

Introduction to Numbering Systems

Introduction to Numbering Systems NUMBER SYSTEM Introduction to Numbering Systems We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are Binary Base 2 Octal Base 8 Hexadecimal

More information

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq CS 121 Digital Logic Design Chapter 1 Teacher Assistant Hadeel Al-Ateeq Announcement DON T forgot to SIGN your schedule OR you will not be allowed to attend next lecture. Communication Office hours (8

More information

SE311: Design of Digital Systems

SE311: Design of Digital Systems SE311: Design of Digital Systems Lecture 3: Complements and Binary arithmetic Dr. Samir Al-Amer (Term 041) SE311_Lec3 (c) 2004 AL-AMER ١ Outlines Complements Signed Numbers Representations Arithmetic Binary

More information

Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm. Nathan Pihlstrom.

Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm. Nathan Pihlstrom. Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm Nathan Pihlstrom www.uccs.edu/~npihlstr My Background B.S.E.E. from Colorado State University M.S.E.E. from Colorado State University M.B.A. from UCCS Ford

More information

Number System. Introduction. Decimal Numbers

Number System. Introduction. Decimal Numbers Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

More information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information Logic and Computer Design Fundamentals Chapter 1 Digital Computers and Information Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal]

More information

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010 Contents Number systems and conversion Binary arithmetic Representation of negative numbers Addition of two s complement numbers Addition of one s complement numbers Binary s Readings Unit.~. UNIT NUMBER

More information

Digital Systems and Binary Numbers

Digital Systems and Binary Numbers Digital Systems and Binary Numbers Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) 1 / 51 Overview 1 Course Summary 2 Binary Numbers 3 Number-Base

More information

Number representations

Number representations Number representations Number bases Three number bases are of interest: Binary, Octal and Hexadecimal. We look briefly at conversions among them and between each of them and decimal. Binary Base-two, or

More information

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES Structure 2.0 Introduction 2.1 Unit Objectives 2.2 Number Systems 2.3 Bits and Bytes 2.4 Binary Number System 2.5 Decimal Number System 2.6 Octal Number System

More information

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Digital Systems COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Welcome to COE 202 Course Webpage: http://faculty.kfupm.edu.sa/coe/mudawar/coe202/ Lecture

More information

Number Systems CHAPTER Positional Number Systems

Number Systems CHAPTER Positional Number Systems CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of

More information

DIGITAL SYSTEM DESIGN

DIGITAL SYSTEM DESIGN DIGITAL SYSTEM DESIGN UNIT I: Introduction to Number Systems and Boolean Algebra Digital and Analog Basic Concepts, Some history of Digital Systems-Introduction to number systems, Binary numbers, Number

More information

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem   ahmadsm AT kfupm Phone: Office: COE 0: Digital Logic Design Number Systems Part Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: -34 Objectives Arithmetic operations: Binary number system Other number systems Base Conversion

More information

TOPIC: NUMBER SYSTEMS

TOPIC: NUMBER SYSTEMS Ministry of Secondary Education Progressive Comprehensive High School PCHS Mankon Bamenda Department of Computer Studies Republic of Cameroon Peace Work - Fatherland TOPIC: NUMBER SYSTEMS Class: Comp.

More information

Number Systems Base r

Number Systems Base r King Fahd University of Petroleum & Minerals Computer Engineering Dept COE 2 Fundamentals of Computer Engineering Term 22 Dr. Ashraf S. Hasan Mahmoud Rm 22-44 Ext. 724 Email: ashraf@ccse.kfupm.edu.sa 3/7/23

More information

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

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

More information

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design 1 COE 0- Digital Logic Number Systems II Dr. Abdulaziz Y. Barnawi COE Department KFUPM COE 0 Logic Design January 3, 016 Objectives Base Conversion Decimal to other bases Binary to Octal and Hexadecimal

More information

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

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

More information

Positional Number System

Positional Number System Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.

More information

Lecture (03) Binary Codes Registers and Logic Gates

Lecture (03) Binary Codes Registers and Logic Gates Lecture (03) Binary Codes Registers and Logic Gates By: Dr. Ahmed ElShafee Binary Codes Digital systems use signals that have two distinct values and circuit elements that have two stable states. binary

More information

CMPE223/CMSE222 Digital Logic Design. Positional representation

CMPE223/CMSE222 Digital Logic Design. Positional representation CMPE223/CMSE222 Digital Logic Design Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Positional representation First consider integers Begin with positive only

More information

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 1 CHAPTER TWO Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 2-1 Data Types 2-2 Complements 2-3 Fixed-Point Representation 2-4 Floating-Point Representation

More information

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee ١ Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee Digital systems Digital systems are used in communication, business transactions, traffic control, spacecraft guidance, medical

More information

in this web service Cambridge University Press

in this web service Cambridge University Press 978-0-51-85748- - Switching and Finite Automata Theory, Third Edition Part 1 Preliminaries 978-0-51-85748- - Switching and Finite Automata Theory, Third Edition CHAPTER 1 Number systems and codes This

More information

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:

More information

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur 1 Number Representation 2 1 Topics to be Discussed How are numeric data items actually

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds. UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers of ): DIGIT 3 4 5 6 7 8 9 Number:

More information

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010 // EE : INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN Lecture : Introduction /9/ Avinash Kodi, kodi@ohio.edu Agenda Go over the syllabus Introduction ti to Digital it Systems // Why Digital Systems?

More information

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Binary Addition. Add the binary numbers and and show the equivalent decimal addition. Binary Addition The rules for binary addition are 0 + 0 = 0 Sum = 0, carry = 0 0 + 1 = 0 Sum = 1, carry = 0 1 + 0 = 0 Sum = 1, carry = 0 1 + 1 = 10 Sum = 0, carry = 1 When an input carry = 1 due to a previous

More information

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:

More information

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums plc numbers - 3. 3. NUMBERS AND DATA Topics: Number bases; binary, octal,, hexa Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;

More information

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

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

More information

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR UNIT I Digital Systems: Binary Numbers, Octal, Hexa Decimal and other base numbers, Number base conversions, complements, signed binary numbers, Floating point number representation, binary codes, error

More information

MC1601 Computer Organization

MC1601 Computer Organization MC1601 Computer Organization Unit 1 : Digital Fundamentals Lesson1 : Number Systems and Conversions (KSB) (MCA) (2009-12/ODD) (2009-10/1 A&B) Coverage - Lesson1 Shows how various data types found in digital

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Quiz 2 Agenda Lecture: Chapter 2 (2-7 through 2-11):

More information

Chapter 2. Data Representation in Computer Systems

Chapter 2. Data Representation in Computer Systems Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting

More information

1.3 Systems of numeration: To represent quantities in the different systems of numeration, specific symbols are used, which are also called ciphers.

1.3 Systems of numeration: To represent quantities in the different systems of numeration, specific symbols are used, which are also called ciphers. Chapter One 1.1 Introduction: Numbers are used to express quantities. There are many numerations systems used in the field of digital electronics, one of the most important being the binary system of numeration

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CMPS Introduction to Computer Science Lecture Notes Binary Numbers Until now we have considered the Computing Agent that executes algorithms to be an abstract entity. Now we will be concerned with techniques

More information

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds. ECE-78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers

More information

Chapter 1. Digital Systems and Binary Numbers

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

More information

Module -10. Encoder. Table of Contents

Module -10. Encoder. Table of Contents 1 Module -10 Encoder Table of Contents 1. Introduction 2. Code converters 3. Basics of Encoder 3.1 Linear encoders 3.1.1 Octal to binary encoder 3.1.2 Decimal to BCD encoder 3.1.3 Hexadecimal to binary

More information

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh LOGIC DESIGN Dr. Mahmoud Abo_elfetouh Course objectives This course provides you with a basic understanding of what digital devices are, how they operate, and how they can be designed to perform useful

More information

Lecture 1: Digital Systems and Number Systems

Lecture 1: Digital Systems and Number Systems Lecture 1: Digital Systems and Number Systems Matthew Shuman September 26th, 2012 The Digital Abstraction 1.3 in Text Analog Systems Analog systems are continuous. Look at the analog clock in figure 1.

More information

Lecture (01) Introduction Number Systems and Conversion (1)

Lecture (01) Introduction Number Systems and Conversion (1) Lecture (01) Introduction Number Systems and Conversion (1) By: Dr. Ahmed ElShafee ١ Digital systems Digital systems are used in communication, business transactions, traffic control, spacecraft guidance,

More information

Hybrid Electronics Laboratory

Hybrid Electronics Laboratory Hybrid Electronics Laboratory Design and Simulation of Various Code Converters Aim: To Design and Simulate Binary to Gray, Gray to Binary, BCD to Excess 3, Excess 3 to BCD code converters. Objectives:

More information

Fundamentals of Programming (C)

Fundamentals of Programming (C) Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems

More information

Module 2: Computer Arithmetic

Module 2: Computer Arithmetic Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N

More information

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations. Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations

More information

Digital Logic Lecture 2 Number Systems

Digital Logic Lecture 2 Number Systems Digital Logic Lecture 2 Number Systems By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Outline Introduction. Basic definitions. Number systems types. Conversion between different

More information

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr Introduction to Numbering Systems We are all familiar with the decimal number system (Base 10). Some other number systems

More information

Objectives. Connecting with Computer Science 2

Objectives. Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn how numbering systems are used to count Understand the significance of positional value

More information

COPYRIGHTED MATERIAL. Number Systems. 1.1 Analogue Versus Digital

COPYRIGHTED MATERIAL. Number Systems. 1.1 Analogue Versus Digital 1 Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer. It

More information

COMP Overview of Tutorial #2

COMP Overview of Tutorial #2 COMP 1402 Winter 2008 Tutorial #2 Overview of Tutorial #2 Number representation basics Binary conversions Octal conversions Hexadecimal conversions Signed numbers (signed magnitude, one s and two s complement,

More information

Data Representation and Binary Arithmetic. Lecture 2

Data Representation and Binary Arithmetic. Lecture 2 Data Representation and Binary Arithmetic Lecture 2 Computer Data Data is stored as binary; 0 s and 1 s Because two-state ( 0 & 1 ) logic elements can be manufactured easily Bit: binary digit (smallest

More information

Digital Systems and Binary Numbers

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

More information

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan Number Systems Dr. Tarek A. Tutunji Philadelphia University, Jordan Number Systems Programmable controllers use binary numbers in one form or another to represent various codes and quantities. Every number

More information

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the high-order bit

More information

Switching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Switching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Switching Circuits and Logic Design Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 02 Octal and Hexadecimal Number Systems Welcome

More information

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we

More information

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 APPENDIX A.1 Number systems and codes Since ten-fingered humans are addicted to the decimal system, and since computers

More information

Binary. Hexadecimal BINARY CODED DECIMAL

Binary. Hexadecimal BINARY CODED DECIMAL Logical operators Common arithmetic operators, like plus, minus, multiply and divide, works in any number base but the binary number system provides some further operators, called logical operators. Meaning

More information

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM

1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1. NUMBER SYSTEMS USED IN COMPUTING: THE BINARY NUMBER SYSTEM 1.1 Introduction Given that digital logic and memory devices are based on two electrical states (on and off), it is natural to use a number

More information

Chapter 3 DATA REPRESENTATION

Chapter 3 DATA REPRESENTATION Page1 Chapter 3 DATA REPRESENTATION Digital Number Systems In digital systems like computers, the quantities are represented by symbols called digits. Many number systems are in use in digital technology

More information

Computer Logical Organization Tutorial

Computer Logical Organization Tutorial Computer Logical Organization Tutorial COMPUTER LOGICAL ORGANIZATION TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Computer Logical Organization Tutorial Computer

More information

Module 1: Information Representation I -- Number Systems

Module 1: Information Representation I -- Number Systems Unit 1: Computer Systems, pages 1 of 7 - Department of Computer and Mathematical Sciences CS 1305 Intro to Computer Technology 1 Module 1: Information Representation I -- Number Systems Objectives: Learn

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

This tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture.

This tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture. About the Tutorial Computer Logical Organization refers to the level of abstraction above the digital logic level, but below the operating system level. At this level, the major components are functional

More information

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude Chapter 2 Positional number systems A positional number system represents numeric values as sequences of one or more digits. Each digit in the representation is weighted according to its position in the

More information

EEM 232 Digital System I

EEM 232 Digital System I EEM 232 Digital System I Instructor : Assist. Prof. Dr. Emin Germen egermen@anadolu.edu.tr Course Book : Logic and Computer Design Fundamentals by Mano & Kime Third Ed/Fourth Ed.. Pearson Grading 1 st

More information

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

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

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics Numbers & Number Systems Introduction Numbers and Their Properties Multiples and Factors The Division Algorithm Prime and Composite Numbers Prime Factors

More information

Chapter 2 Data Representations

Chapter 2 Data Representations Computer Engineering Chapter 2 Data Representations Hiroaki Kobayashi 4/21/2008 4/21/2008 1 Agenda in Chapter 2 Translation between binary numbers and decimal numbers Data Representations for Integers

More information

CS & IT Conversions. Magnitude 10,000 1,

CS & IT Conversions. Magnitude 10,000 1, CS & IT Conversions There are several number systems that you will use when working with computers. These include decimal, binary, octal, and hexadecimal. Knowing how to convert between these number systems

More information

Chapter 5: Computer Arithmetic. In this chapter you will learn about:

Chapter 5: Computer Arithmetic. In this chapter you will learn about: Slide 1/29 Learning Objectives In this chapter you will learn about: Reasons for using binary instead of decimal numbers Basic arithmetic operations using binary numbers Addition (+) Subtraction (-) Multiplication

More information

Number Systems & Encoding

Number Systems & Encoding Number Systems & Encoding Lecturer: Sri Parameswaran Author: Hui Annie Guo Modified: Sri Parameswaran Week2 1 Lecture overview Basics of computing with digital systems Binary numbers Floating point numbers

More information