Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Systems and Binary Numbers

Similar presentations


Presentation on theme: "Digital Systems and Binary Numbers"— Presentation transcript:

1 Digital Systems and Binary Numbers
Book: Mano & Ciletti Chapter 1

2 Outline Digital Systems Binary Numbers Number-Base Conversions
Octal and Hexadecimal Numbers Complements Signed Binary Numbers Binary Codes Binary Storage and Registers Binary Logic

3 Digital Systems Digital System: is a system in which signals have finite number of discrete values (electric impulses, decimal digits, arithmetic operations, etc.) Analog System: is a system in which signals have infinite number of values (electric voltage that vary with time).

4 Digital Systems Why Are Digital Systems Important?
It is well suited for numerical and non-numerical information processing. Information processing can use a general-purpose system (computer). The finite number of values in a digital signal is represented by a vector of signals with just 2 values (binary signals). Digit 1 2 3 4 5 6 7 8 9 Vector 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

5 Digital Systems Digital signals are quite insensitive to variations of component variable values Numerical digital systems can be made more accurate by increasing the number of digits used in the representation. Complex digital systems are built as integrated circuits composed of a large number of very simple devices. It is possible to select among different implementations of systems that trade off speed and amount of hardware.

6 Digital Systems When Are Digital Systems Used?
Digital representation and processing methods widely used Extraordinary progress in digital technology and use Indispensable in modern society New applications fueled by the development of computer technology Knowledge about the design and use of digital systems required in a large variety of human activities

7 Analog and Digital Signals
The process of converting from analog to digital is call quantization or digitization.

8 Binary Numbers 7392 represents a quantity that is equal to
7× × × × 10 0 In binary system, possible values are 0 and 1 and each digit is multiplied by 2 𝑖 E.g is 1× × × × × × 2 −1 +1× 2 −2 =26.75

9 Binary Numbers and Others
System Radix Allowable Digits Binary ,1 Octal ,1,2,3,4,5,6,7 Decimal ,1,2,3,4,5,6,7,8,9 Hexadecimal ,1,2,3,4,5,6,7,8,9,A, B, C, D, E, F (4021.2)5 = 4 x x x x x 5-1 4 x x (1/5) = (511.4)10 (B65F)16 = x x x x 160 11 x x x = (46687)10

10 Binary Numbers Operations work similarly in all bases

11 Number-Base Conversions
Converting a number from base x to decimal is simple (as shown before) Decimal to base x is easier if number is separated into integer and fraction parts Convert 41 to binary Divide 41 by 2, quotient is 20 and remainder is 1. Continue dividing the quotient until it becomes 0. Remainders give us the binary number as follows:

12 Number Base Conversion
Conversion from Decimal 41 to Binary Integer quotient Remainder Coefficient 41/2 = 20 + ½ a0=1 20/2 = a1=0 10/2 = a2=0 5/2 = 2 + ½ a3=1 2/2 = a4=0 1/2 = 0 + ½ a5=1 (41)10=(101001)2 Example : (153)10=(?)8

13 Number Base Conversion
Conversion from Decimal fraction (0.6875)10 to Binary: Integer Fraction Coefficient x 2= a_1=1 x 2= a_2=0 x 2= a_3=1 x 2= a_4=1 (0.6875)10=(0.1011)2 The conversion from decimal fraction to any base-r system is similar to the example. Multiplication is by r instead of 2, and the coefficients found from the integers may range in value from 0 to r-1 instead of 0 and 1. Example: (0.513)10=(?)8

14 Octal and Hexadecimal Numbers
The conversion from binary to octal and hexadecimal plays an important part in digital systems (computers). Since 23 = 8 and 24 = 16

15 Octal and Hexadecimal Numbers
Conversion from Octal to binary: ( ) 8 = ( ) 2  Conversion from Hexadecimal to binary: (306.D) 16 = ( ) 2  Conversion from Hexadecimal to Decimal: (37B) x x x 160 = 3 x x x 1 = = (891) 10

16 Complements Simplifies Two types exist the subtraction operation
Logical operations Two types exist The radix complement (r’s complement) 10’s complement, 2’s complement The diminished radix complement ((r-1)’s complement) 9’s complement, 1’s complement

17 Diminished Radix (r-1) complement
Given a number N in base r having n digits: (r-1)’s complement of N is (rn-1)-N When r=10, (r-1)’s complement is called 9’s complement. 10n-1 is a number represented by n 9’s. 9’s complement of is (n=6) =453299 9’s complement of is (n=6) =987601

18 1’s complement For binary numbers, r=2 and r-1=1.
1’s complement of N is (2n-1)-N If n=4, 2n= So, 2n-1=1111. To determine the 1’s complement of a number, subtract each digit from 1. Or, bit flip!!! Replace 0’s with 1’s, 1’s with 0’s!!! Example: If N= , 1’s comp.= If N= , 1’s comp.=

19 Radix (r’s) complement
Given a number N in base r having n digits: r’s complement of N is rn-N When r=10, r’s complement is called 10’s complement. 10’s complement of is (n=6) =453300 10’s complement of is (n=6) =987602

20 Radix (r’s) complement
The 10’s complement of decimal 2389 = (104 –1) – = 7611. The 2’s complement of binary = (26 –1) – = 012389= (106 –1) – = 246700= (106 –1) – =

21 Radix (r’s) complement
To find the radix complement representation of a number, it is more convenient to first derive the diminished radix complement. The radix complement is then obtained by adding 1 to the diminished radix complement. The 9's complement of a decimal number is obtained by subtracting each digit from 9. The 7's complement of an octal number is obtained by subtracting each digit from 7. The 1's complement of a binary integer is obtained by subtracting each digit from 1.

22 Radix (r’s) complement
Examples: Find the 10's complement and the 9's complement of (546700) 10 (453299)10     9's complement (453300)10     10's complement (add 1 to the 9’s complement) Find the 8's complement and the 7's complement of (526071) 8 (251706)8     7's complement (251707)8     8's complement (add 1 to the 7’s complement) Find the 2's complement and the 1's complement of ( ) 2 ( )2     1's complement ( )2     2's complement (add 1 to the 1’s complement)

23 2’s complement For binary numbers, r=2, 2’s complement of N is 2n-N
To determine the 2’s complement of a number, determine 1’s complement and add 1 to it. Example: If N= , 1’s comp.= , 2’s comp.= If N= , 2’s comp.=

24 Radix (r’s) complement
Subtraction with Complements

25 Radix (r’s) complement
Subtraction with Complements

26 Radix (r’s) complement
Subtraction with Complements

27 Signed Binary Numbers Negative numbers is shown with a minus sign in math. In digital systems, the first bit decides the sign of the number. If the first bit 0, the number is positive. If the first bit 1, the number is negative. This is called signed magnitude convention.

28 Signed complement systems
To represent negative number, 1’s complement and 2’s complements are also used.

29 Signed Binary Numbers 00001001 =9
Example: Represent +9 and -9 in eight bit system =9 Signed magnitude  =-9 Signed-1’s complement  Signed-2’s complement 

30

31 Signed Binary Numbers Arithmetic Addition
The addition of 2 numbers in the signed-magnitude system follows the rules of ordinary arithmetic. If the signs are the same, we add the two magnitudes and give the sum the common sign. If the signs are different, we subtract the smaller magnitudes from the larger and give the result the sign of the larger magnitude. Negative numbers must be in 2’s complement and that the sum obtained after the addition if negative is in 2’s-complement form.

32 Signed Binary Numbers Arithmetic Subtraction
Take the 2’s complement of the subtrahend (including the sign bit) and add it to the minuend (including the sign bit). A carry out of the sign-bit position is discarded (± A) – (+B) = (± A) + (-B) (± A) – (-B) = (± A) + (+B)

33 Binary Codes – BCD Codes
n bit can code upto 2n combinations.

34 BCD Addition

35 Example

36 Binary logic

37 Truth tables

38

39 Gate sysbols

40 Timing diagrams

41 More than two inputs


Download ppt "Digital Systems and Binary Numbers"

Similar presentations


Ads by Google