Chapter 1 Digital Systems and Binary Numbers, Slides of Logic

Chapter 1 Digital Systems and Binary Numbers

Typology: Slides

2019/2020

Uploaded on 02/12/2020

rula-mohammad
rula-mohammad 🇨🇲

1 document

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Digital System Ch1-1
Jouf University : Computer Engineering Department
Logics Design
Chapter 1 : Digital Systems and Binary
Numbers
Outline of Chapter 1
1.1 Digital Systems
1.2 Binary Numbers
1.3 Number-base Conversions
1.4 Octal and Hexadecimal Numbers
1.5 Complements
1.6 Signed Binary Numbers
1.7 Binary Codes
Digital System
Ch1-2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Chapter 1 Digital Systems and Binary Numbers and more Slides Logic in PDF only on Docsity!

Digital System Ch1- 1

Jouf University : Computer Engineering Department

Logics Design

Chapter 1 : Digital Systems and Binary

Numbers

Outline of Chapter 1

 1.1 Digital Systems

 1.2 Binary Numbers

 1.3 Number-base Conversions

 1.4 Octal and Hexadecimal Numbers

 1.5 Complements

 1.6 Signed Binary Numbers

 1.7 Binary Codes

Digital System Ch1- 3

1.1 Digital Systems and Binary Numbers (p.17)

 Digital age and information age

 Digital computers

 General purposes  Many scientific, industrial and commercial applications

 Digital systems

 Telephone switching exchanges  Digital camera  Electronic calculators, PDA's  Digital TV

 Discrete information-processing systems

 Manipulate discrete elements of information  For example, {1, 2, 3, …} and {A, B, C, …}…

Analog and Digital Signal

 Analog system

 The physical quantities or signals may vary continuously over a specified range.

 Digital system

 The physical quantities or signals can assume only discrete values.  Greater accuracy

t

X(t)

t

X(t)

Analog signal Digital signal

Digital System Ch1- 7

Binary Numbers (p.20, 21)

Special Powers of 2

 2 10 (1024) is Kilo, denoted "K"  2 20 (1,048,576) is Mega, denoted "M"  2 30 (1,073,741,824) is Giga, denoted "G"

Powers of two

Example: Base-2 number (110101) 2  32  16  4  1 (53) 10

Arithmetic operation

Arithmetic operations with numbers in base-r follow the same rules as decimal numbers.

Binary Arithmetic (p.21)

 Single Bit Addition with Carry

 Multiple Bit Addition

 Single Bit Subtraction with Borrow

 Multiple Bit Subtraction

 Multiplication

 BCD Addition

Digital System Ch1- 9

 Addition

 Multiplication

 Subtraction

Augend: 101101 Addend: + Sum: 1010100

Minuend: 101101 Subtrahend: - 100111 Difference: 0000110

Multiplicand 1011 Multiplier × 101 Partial Products 1011 0000 1011 Product 110111

Binary Arithmetic (p.21)

1.3 Number-Base Conversions (p.21)

 The six letters (in addition to the 10 integers) in hexadecimal

represent: 10 (A), 11 (B), 12 (C), 13 (D), 14 (E), and 15 (F), respectively.

Name Radix Digits Binary 2 0, Octal 8 0,1,2,3,4,5,6, Decimal 10 0,1,2,3,4,5,6,7,8, Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

Digital System Ch1- 13

Number-Base Conversions (p.22, 23)

 Example 1.

 Convert decimal 153 to octal. The required base r is 8.

 Example1.

 Convert (0.6875) 10 to binary.  The process is continued until the fraction becomes 0 or until the number of digits has sufficient accuracy.

Number-Base Conversions

 Example1.3 (cont.)

 To convert a decimal fraction to a number expressed in base r, a similar procedure is used. However, 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.

Digital System Ch1- 15

Number-Base Conversions (p.23)

 Example1.  Convert (0.513) 10 to octal.

 From Examples 1.1 and 1.3: (41.6875) 10 = (101001.1011) 2  From Examples 1.2 and 1.4: (153.513) 10 = (231.406517) 8

1.4 Octal and Hexadecimal Numbers (p.24)

 Numbers with different bases: Table 1.2.

Digital System Ch1- 19

Complements (p.28)

 Subtraction with Complements

 Example 1.

 Given the two binary numbers X = 1010100 and Y = 1000011, perform the subtraction (a) X – Y ; and (b) Y  X, by using 2's complement.

There is no end carry. Therefore, the answer is Y – X =  (2's complement of 1101111) =  0010001.

1.6 Signed Binary Numbers (p.30)

 To represent negative integers, we need a notation for negative

values.

 It is customary to represent the sign with a bit placed in the

leftmost position of the number since binary digits.

 The convention is to make the sign bit 0 for positive and 1 for

negative.

 Example:

 Table 1.3 lists all possible four-bit signed binary numbers in the

three representations.

Digital System Ch1- 21

Signed Binary Numbers (p.31)

Signed Binary Numbers (p.32)

 Arithmetic addition

 The addition of two 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 magnitude from the larger and give the difference the sign of the larger magnitude.  The addition of two signed binary numbers with negative numbers represented in signed-2's-complement form is obtained from the addition of the two numbers, including their sign bits.  A carry out of the sign-bit position is discarded.

 Example:

Digital System Ch1- 25

Binary Code (p.35)

 Example:

 Consider decimal 185 and its corresponding value in BCD and binary:

 BCD addition

Binary Code (p.36)

 Example:

 Consider the addition of 184 + 576 = 760 in BCD:

 Decimal Arithmetic: (+375) + (-240) = +

Digital System Ch1- 27

Binary Codes (p.38)

 Gray Code

 The advantage is that only bit in the code group changes in going from one number to the next. » Error detection. » Representation of analog data. » Low power design. 000 001

010 100

110 111

101

011

1-1 and onto!!

Binary Codes (p.39, 40)

 American Standard Code for Information Interchange (ASCII) Character Code