0% found this document useful (0 votes)
35 views10 pages

Chapter 1

Digital circuits have several advantages over analog circuits including cheaper electronic circuits, easier calibration and adjustment, and greater resistance to noise resulting in clearer pictures and sound. Most digital devices are also programmable, allowing the same hardware to be used for many applications by changing the program. Commercial products use digital circuits instead of analog because of these benefits and flexibility.

Uploaded by

sjbong0904
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views10 pages

Chapter 1

Digital circuits have several advantages over analog circuits including cheaper electronic circuits, easier calibration and adjustment, and greater resistance to noise resulting in clearer pictures and sound. Most digital devices are also programmable, allowing the same hardware to be used for many applications by changing the program. Commercial products use digital circuits instead of analog because of these benefits and flexibility.

Uploaded by

sjbong0904
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Benefits of using digital

Analog signal Digital signal

• Advantages of using Digital:


• Cheap electronic circuits
• Easier to calibrate and adjust
• Resistance to noise: Clearer picture and sound

Binary System

• Discrete elements of information are represented with


bits called binary codes.

Example: (09)10 = (1001)2


(15)10 = (1111)2

Question: Why are commercial products made with digital


circuits as opposed to analog?

Most digital devices are programmable: By changing the


program in the device, the same underlying hardware can
be used for many different applications.
Decimal Code

4 Review the decimal number system.


Base (Radix) is 10 - symbols (0,1, . . 9) Digits
For Numbers > 9, add more significant digits in
position to the left, e.g. 19>9.
Each position carries a weight.
MSD
Weights: 103 102 101 100 10−110−2 10−3 LSD

ü If we were to write 1936.25 using a power series


expansion and base 10 arithmetic:
1× 103 + 9 × 102 + 3× 101 + 6 × 100 + 2 × 10−1 + 5 × 10−2

Binary number system

4 The binary number system.


– Base is 2 - symbols (0,1) - Binary Digits (Bits)
– For Numbers > 1, add more significant digits in position
to the left, e.g. 10>1.
– Each position carries a weight (using decimal).
MSD
Weights: 23 2 2 21 2 0 2 −1 2 −2 2 −3 LSD

ü If we write 10111.01 using a decimal power


series we convert from binary to decimal:
1× 24 + 0 × 23 + 1× 22 + 1× 21 + 1× 20 + 0 × 2−1 + 1× 2 −2 =
= 1× 16 + 0 × 8 + 1× 4 + 1× 2 + 1× 1 + 0 × 0.5 + 1× 0. 25 = 23.25
Binary number system

q (110000.0111)2 = ( ? )10

ANS: 48.4375

4 In computer work: 210 =1024 is referred as K = kilo


220 =1048576 is referred as M = mega
230 = ?
240 = ?

q What is the exact number of bytes in a 16 Gbyte


memory module?

Octal/Hex number systems

4 The octal number system [from Greek: ΟΚΤΩ].


– Its base is 8 à eight digits 0, 1, 2, 3, 4, 5, 6, 7

ü (236.4)8 = ( ? )10
2 × 82 + 3 × 81 + 6 × 80 + 4 × 8−1 = 158. 5
4 The hexadecimal number system [from Greek: ∆ΕΚΑΕΞΙ].
– Its base is 16 à first 10 digits are borrowed from the
decimal system and the letters A, B, C, D, E, F are used for
the digits 10, 11, 12, 13, 14, 15

ü (D63FA)16 = ( ? )10
13× 164 + 6 × 163 + 3 × 162 + 15 × 161 + 10 × 160 = 877562
Conversion from Decimal to Binary

4 Conversion from decimal to binary:


Let each bit of a binary number be represented by a variable
whose subscript = bit positions, i.e.,

(110 ) 2 = (a2 a1a0 ) 2


Its decimal equivalent is:
(1× 2 2 + 1× 21 + 0 × 20 )10 = (a2 × 22 + a1 × 21 + a0 × 20 ) 10

It is necessary to separate the number into an integer part


and a fraction: Repeatedly divide the decimal number by 2.

Conversion from Decimal to Binary

ü Find the binary equivalent of 37.

2 37 = 18 + 0.5 1 LSB
2 18 =9 +0 0
2 9 = 4 + 0.5 1
3710 = 100101 2
2 4 =2 +0 0
2 2 =1 +0 0
21 = 0 + 0.5 1 MSB

q 5310 = ____
? 2 ANS: 5310 = 110101 2
Conversion from Decimal to Binary

4 Conversion from decimal fraction to binary:


same method used for integers except multiplication
is used instead of division.
ü Convert (0.8542)10 to binary (give answer to 6 digits).
0.8542 x 2 = 1 + 0.7084 a-1 = 1 MSB
0.7084 x 2 = 1 + 0.4168 a-2 = 1
0.4168 x 2 = 0 + 0.8336 a-3 = 0
0.8336 x 2 = 1 + 0.6672 a-4 = 1
0.6675 x 2 = 1 + 0.3344 a-5 = 1
0.3344 x 2 = 0 + 0.6688 a-6 = 0 LSB

(0. 8542)10 = (0.a−1a−2 a−3 a−4 a−5a− 6 )2 = (0. 110110)2

q (53.8542)10 = ( ? )2

Conversion from Decimal to Octal

4 Conversion from decimal to octal:


The decimal number is first divided by 8. The remainder is
the LSB. The quotient is then divide by 8 and the remainder is
the next significant bit and so on.
ü Convert 1122 to octal.

8 1122 = 140 + 0.25 R2 LSB


8 140 = 17 + 0.5 R4
8 17 = 2 + 0.125 R1
8 2 = 0 + 0.25 R2 MSB

112210 = 21428
Decimal Hex Binary Octal
0 0 0000 00
1 1 0001 01
Table 1-2 2 2 0010 02
3 3 0011
page: 8 4 4 0100
03
04
5 5 0101 05
6 6 0110 06
7 7 0111 07
8 8 1000 10
9 9 1001 11
10 A 1010 12
11 B 1011 13
12 C 1100 14
13 D 1101 15
14 E 1110 16
15 F 1111 17

Conversion using Table

4 Conversion from and to binary, octal, and hexadecimal


plays and important part in digital computers.

since 2 3 = 8 and 2 4 = 16
each octal digit corresponds to 3 binary digits
and each hexa digit corresponds to 4 binary digits.

ü (010 111 100 . 001 011 000)2 = (274.130)8


from
table
ü (0110 1111 1101 . 0001 0011 0100)2 = (6FD.134)16
1’s and 2’s Complements
4 1’s complement of N = (2n-1) – N (N is a binary #)
1’s complement can be formed by changing 1’s to 0’s and 0’s to 1’s
2’s complement of a number is obtained by leaving all least
significant 0’s and the first 1 unchanged, and replacing 1’s with
0’s and 0’s with 1 in all higher significant digits.

ü The 1’s complement of 1101011 = 0010100

ü The 2’s complement of 0110111 = 1001001

q Find the 1’s and 2’s-complement of 10000000

Answer: 01111111 and 10000000

Subtraction Using Complements


4 Subtraction with digital hardware using complements:
Subtraction of two n-digit unsigned numbers M – N
base r:

1. Add M to the r’s complement of N: M + (rn – N)


2. If M ≤ N, the sum will produce an end carry and is
equal to rn that can be discarded. The result is then
M – N.
3. If M ≥ N, the sum will not produce an end carry
and is equal to rn – (N – M)
Binary Subtraction using complements

4 Binary subtraction is done using the same procedure.


ü Subtract 1010100 – 1000011 using 2’s complement:
A= 1010100
2’s complement of B = + 0111101
Sum = 10010001
Discard end carry = – 10000000 end carry
Answer = 0010001

q Subtract 1000011 – 1010100 using 2’s complement:


Answer = – 0010001

Binary Subtraction using complements

ü Subtract 1010100 – 1000011 using 1’s complement:


A= 1010100
1’s complement of B = + 0111100
Sum = 10010000
End-around carry = + 1
Answer = 0010001

q Subtract 1000011 – 1010100 using 1’s complement:


Answer = – 0010001
Arithmetic addition

Negative numbers must be initially in 2’s complement form and


if the obtained sum is negative, it is in 2’s complement form.

+6 00000110 –6 11111010
+13 00001101 +13 00001101
+19 00010011 +7 00000111

q Add –6 and –13

Answer = 11101101

Transfer of Information with Registers

J
Binary Information Processing

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy