Presentation on theme: "Number Systems Digital Logic By: Safwan Mawlood"— Presentation transcript:
1 Number Systems Digital Logic By: Safwan Mawlood Digital Principles and Logic Design, A.Saha &N.Manna
2 Number Systems Knowing what base someone refers to Decimal uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.Binary uses 2 digits: 0 and 1.Octal number system there are 8 digits—0, 1, 2, 3, 4, 5, 6, and 7.Hexadecimal number system has 16 digits—0 to 9— and the rest of the six digits are speciﬁes by letter symbols as A,B, C, D, E, and F. Here A, B, C, D, E, and F represent decimal 10, 11, 12, 13, 14, and 15 respectively.
5 Hexadecimal123456789ABCDEFThe base 16, or hexadecimal (hex), number system is used frequently when working with computers, because it can be used to represent binary numbers in a more readable form.
6 CONVERSION BETWEEN NUMBER SYSTEMS It is often required to convert a number in a particular number system to any other number system, e.g., it may be required to convert a decimal number to binary or octal or hexadecimal.
7 Converting Decimal to Binary To convert a number in decimal to a number in binary we have to divide the decimal number by 2 repeatedly, until the quotient of zero is obtained.
8 Converting Decimal to Binary Start by dividing the decimal by the largest number in the Value row that will go.
9 Decimal to Octal Conversion Similarly, to convert a number in decimal to a number in octal we have to divide the decimal number by 8 repeatedly, until the quotient of zero is obtained.
10 Decimal-to-hexadecimal Conversion The same steps are repeated to convert a number in decimal to a number in hexadecimal. Only here we have to divide the decimal number by 16 repeatedly, until the quotient of zero is obtained.
12 Converting 8-Bit Binary to Decimal Binary numbers are converted to decimal numbers by multiplying the binary digits by the base number of the system, which is base 2, and raised to the exponent of its position.
13 Octal-to-Decimal Conversion Ex. Convert into decimal number.Sol. The octal number given is 3462
14 Hexadecimal-to-decimal Conversion Ex. Convert 42AD 16 to decimal
15 Fractional Conversion Example: Convert into decimal number
16 Octal-to-decimal Conversion Example: Convert into a decimal number.
17 Hexadecimal to Decimal number Example: 42A.1216
32 Subtraction Using 2’s Complement Binary subtraction can be performed by adding the 2’s complement of the subtrahend to the minuend. If a carry is generated, discard the carry. Now if the subtrahend is larger than the minuend, then no carry is generated
36 CodeComputers and other digital circuits process data in binary format. Various binary codes are used to represent data which may be numeric, alphabetic or special characters. Codes are also used for error detection and error correction in digital systems.
37 GrayGray code belongs to a class of code known as minimum change code, in which a number changes by only one bit as it proceeds from one number to the next.
38 Conversion of a Binary Number into Gray Code (101011)2 change to Gray
42 Binary Code DecimalBCD, is a method of using binary digits to represent the decimal digits 0 through 9. A decimal digit is represented by four binary digits, or four bits are required to code each decimal number. as shown below:
43 You must realize that BCD and binary are not the same You must realize that BCD and binary are not the same. For example, 4910 in binary is , but 4910 in BCD is BCD. Each decimal digit is converted to its binary equivalent.
44 BCD ConversionFor example, let's go through the conversion of to BCD. We'll use the block format that you used in earlier conversions. First, write out the decimal number to be converted; then, below each digit write the BCD equivalent of that digit: