Download presentation
Presentation is loading. Please wait.
Published byMeagan Stewart Modified over 8 years ago
1
ECE- 1551 DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016
2
What is a Digital System A digital system is an interconnection of digital modules. To understand the operation of each digital module, it is necessary to have a basic knowledge of digital circuits and their logical function. Structure: The way components are interrelated a collection of interconnected digital modules designed to perform a particular service or function Function: The operation of each individual component as part of the structure Takes a set of discrete information inputs and discrete internal information (system state) and generates a set of discrete information outputs. Digital Processing System Current State Analog Inputs Digital Outputs Digital Inputs ADC The quantization of a process can be performed automatically by an analog ‐ to ‐ digital converter, a device that forms a digital (discrete) representation of a analog (continuous) quantity.
3
Digital System and Binary Numbers Digital systems use just two discrete values and are therefore said to be binary. A binary digit, called a bit, has two values: 0 and 1. Discrete elements of information are represented with groups of bits called binary codes. For example, the decimal digits 0 through 9 are represented in a digital system with a code of four bits (e.g., the number 7 is represented by 0111). How a pattern of bits is interpreted as a number depends on the code system in which it resides. To make this distinction, we could write (0111) 2 to indicate that the pattern 0111 is to be interpreted in a binary system, and (0111) 10 to indicate that the reference system is decimal. Then 0111 2 = 7 10, which is not the same as (0111) 10, or one hundred eleven. Thus, a digital system is a system that manipulates discrete elements of information represented internally in binary form.
4
Numbers Systems Decimal Numbers Binary Numbers Octal and Hexadecimal Number Systems Converting Between Bases Converting Any Base to Decimal Converting Decimal to Any Base Converting Between Binary and Octal Converting Between Binary and Hexadecimal
5
Decimal Number System The standard numbers used in the US are base ten, this is the decimal number system. This system uses ten different symbols to represent numbers. These symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Each digit in a decimal number has a specific value. The number 7,392 is represented by 7 thousand, 3 hundreds, 9 tens, and 2 ones. 7 x 10 3 + 3 x10 2 + 9 x 10 1 + 2 x 10 0 = 7392 Convention is to write numeric coefficients and from their position deduce powers of 10, with powers increasing from right to left. a 5 a 4 a 3 a 2 a 1 a 0.a -1 a -2 a -3 10 5 a 5 + 10 4 a 4 + 10 3 a 3 + 10 2 a 2 + 10 1 a 1 + 10 0 a 0 + 10 -1 a -1 + 10 -2 a -2 + 10 -3 a -3 Coefficients aj are any of the 10 digits (0,1,2,3,4,5,6,7,8,9) Subscript j value gives the place value. Hence the power of 10.
6
Binary Number System The number system typically used in digital logic will be base 2, this is the binary number system. This system uses two different symbols to represent numbers, 0 and 1. The table below shows how the binary system progresses to more than three digits to represent even one decimal digit. Number SystemDecimalBinary One10001 Two20010 Three30011 Four40100 Five50101 Six60110 Seven70111 Eight81000 Nine91001 Ten101010
7
Octal and Hexadecimal Number Systems Other useful number systems used in digital logic are octal and hexadecimal. Octal uses 8 symbols to represent numbers. These symbols are 0, 1, 2, 3, 4, 5, 6, and 7. Hexadecimal uses 16 symbols to represent numbers. These symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. It can be hard to read 8 bits of binary. The 1’s and 0’s tend to blend together and it can cause mistakes. Octal and hexadecimals can be used to condense long binary strings into shorter hexadecimal values. F.g long strings of bits in the addresses, instructions, and data in digital systems. For example, B65F is used to represent 1011011001010000. (Will be discussed later in conversion section)
8
Octal and Hexadecimal Number Systems The table below shows the progression used for octal and hexadecimal. Number SystemDecimalBinaryOctalHexdecimal One10001 11 Two20010 22 Three30011 33 Four40100 44 Five50101 55 Six60110 66 Seven70111 77 Eight81000 108 Nine91001 119 Ten101010 12A Eleven11101113B tweleve12110014C Thirteen13110115D Fourteen14111016E Fifteen15111117F Sixteen16100002010
9
Conversion Between Bases
10
The main source of confusion is when the conversion requires math in different bases an example of this is below. (10) 7 + (6) 8 = (1101) 2 This demonstrates the difficulty of even adding two small numbers when using different bases. A useful method is to convert the entire problem to base 10, and after the answer has been found, convert the answer to the desired base. Converting Any Base to Decimal…
11
Conversion Between Bases: 1: Converting Any Base to Decimal The conversion of a number in base r to decimal is done by expanding the number in a power series and adding all the terms
12
Converting Any Base to Decimal: Binary to Decimal A useful word to describe the base of a number system is radix. The radix of a decimal number is ten, and the radix of a binary number is two. Decimal system uses 10 digits, where as binary uses 2. That is, in binary system coefficients can have only 2 values: 0 and 1. Each coefficient a j is multiplied by a power of the radix, e,g 2 j and the results are added to obtain the decimal equivalent For example, the decimal equivalent of the binary number 11010.11 is ?? 1 * 2 4 + 1 * 2 3 + 0 * 2 2 + 1 * 2 1 + 0 * 2 0 + 1 * 2 -1 + 1 * 2 -2 = 26.75
13
Converting Any Base to Decimal: Binary to Decimal
14
Converting Any Base to Decimal There are many different number systems. In general, a number expressed in a base ‐ r. system has coefficients multiplied by powers of r: r n a n + r n-1 a n-1 + r n-2 a n-2 + ……+ r 2 a 2 + r 1 a 1 + r 0 a 0 + r -1 a -1 + 10 -2 a -2 + 10 -3 a -3 +……+ r m-2 a m-2 + r m-1 a m-1 + r m a m. Coefficients a j range in value from 0 to r -1. Examples: (4021.2) 5 =? (127.4) 8 = ? (B65F) 16 =?
15
Conversion Between Bases: 2: Converting Decimal to any Base For integer part by dividing the number and all successive quotients by r and accumulating the remainders. For fraction part by multiplying the number and all successive fractions by r and accumulating the resulting integers.
16
Converting Decimal to any Base If the number includes a radix point, it is necessary to separate the number into an integer part and a fraction part, since each part must be converted differently. The conversion of a decimal integer to a number in base r is done by dividing the number and all successive quotients by r and accumulating the remainders. Example: Convert decimal 41 to binary.
17
Converting Decimal to Binary Base: Answer Slide Convert decimal 41 to binary. First, 41 is divided by 2 to give an integer quotient of 20 and a remainder of 12. Then the quotient is again divided by 2 to give a new quotient and remainder. The process is continued until the integer quotient becomes 0. The coefficients of the desired binary number are obtained from the remainders as follows:
18
Converting Decimal to Octal Base: Example 2 Convert decimal 153 to octal.
19
Converting Decimal to Octal Base: Answer Slide
20
Converting Decimal to Any Base: Numbers with Fractions Convert (0.6875)10 to binary. First, 0.6875 is multiplied by 2 to give an integer and a fraction. Then the new fraction is multiplied by 2 to give a new integer and a new fraction. The process is continued until the fraction becomes 0 or until the number of digits has sufficient accuracy. The coefficients of the binary number are obtained from the integers as follows:
21
Converting Decimal to Any Base: Summary Successive Quotients The method used to convert a decimal integer number to any other radix is called Successive Quotients. This method uses a recursive algorithm. The integer column begins with the decimal number being converted. The second row is the first row divided by the radix, the quotient on the left and the remainder on the right. This pattern is continued until the quotient returns 0. The conversion is read least significant bit, LSB on the top. The algorithm for this process is itemized below. 1. Divide the initial decimal number by the radix. 2. Place the remainder into the LSB (Least Significant Bit) digit of the converted result. 3. Divide the current quotient by the radix. 4. Place the remainder into the next LSB digit of the converted result. 5. Repeat Step 3 and 4 until the quotient is 0
22
Converting Decimal to Any Base: Summary Successive Products The process of converting decimal fractions is a similar recursive algorithm process. 1. Multiply the initial decimal fraction by the radix. 2. Place the integer into the MSB (Most Significant Bit) digit of the converted result. 3. Multiply the current fraction by the radix. 4. Place the integer into the next MSB digit of the converted result. 5. Repeat Step 3 and 4 until the fraction is 0 or the required number of bits have been converted.
23
Converting Decimal to Any Base: Numbers with Fractions Example Convert (0.513) 10 to octal: Convert (41.6875) 10 to binary Convert (153.513) 10 to octal
24
Quickly Converting Between Binary and Hexadecimal Conversion from and to binary, octal and hexadecimal helps shorter patterns of octal and hex characters to recognize than long patterns of 1’s and 0’s. Since 2 3 =8 and 2 4 =16. Each octal digit corresponds to three binary digits and each hexadecimal digit corresponds to four binary digits. To convert from binary to octal, first partition the binary number into group of three digits each. Starting from the binary point and preceding from the left to the right. Corresponding octal digit is then assigned to each group. Example (10 110 001 101 011. 111 100 000 110) 2 2 6 1 5 3 7 4 0 6 = (26153.7406) 8
25
Quickly Converting Between Binary and Hexadecimal Conversion from binary to hexadecimal is similar, except binary number is divided into groups of four digits: Example (10 1100 0110 1011. 1111 0010) 2 = 2 C 6 B F 2 (2C6B.F2) 16
26
Next Class Study Number Systems – Signed and Unsigned numbers.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.