Docsity

Analog vs Digital Systems: Understanding the Differences in Logic and Numbering, Slides of Electrical Circuit Analysis

Partial preview of the text

Download Analog vs Digital Systems: Understanding the Differences in Logic and Numbering and more Slides Electrical Circuit Analysis in PDF only on Docsity!

Engineering 43

Boolean

Logic Systems

Analog vs Digital

  • Up to know we have examined ANALOG

systems

  • In Analog systems the Quantity of Interest (I or

V usually) Varies continuously with time → U =

f ( t )

  • In the Analog case U plots as a smooth curve

vs t

  • Digital signals are discontinuous in time;

ocassionally dU/dt → ∞ (in theory)

U Binary vs MultiLevel Digital

t

1

U

t

1

−

 BInary → TWO Level (0/1, Lo/Hi, N/Y)

with “Bits” (Binary Digits):

 TRInary → THREE Level (−1/0/1,

Lo/Med/Hi) with “TRITS”:

Zero Levels are Significant

Binary Logic

  • Virtually ALL Electronic-

Computer Logic is BINARY.

  • But the Signals are not

always “Clean”

  • A Margin for Error to account for Noisy Signals is called the “Noise Margin”
  • A Good “NM” allows a weak INput to make a strong Output

Binary Noise Margins

  • By the Diagram Above
  • Inputs in the range VIHmin<Vin <VILmax

Produce Unpredictable Results

NM (^) H = VOH min − VIH min NM (^) L = VIL max − VOL max

Numbering Systems

  • Numbering Systems (bases) used in Electronic

Systems

  • Binary, Base-
  • Octal, Base-
  • Decimal, Base-10 (Human Base)
  • Hexadecimal, Base-16 (Digit “F 16 ” = 15 10 )
  • Examples 4623 7

in Decimal

  • → 1683 10

7

7

3 2 1 0 7

= × + × + × + ×
= × + × + × + ×

Counting: Decimal vs Binary

  • NOTE that 25 10 = 11001 2

Decimal Binary Decimal Binary 0 0 13 1101 1 1 14 1110 2 10 15 1111 3 11 16 10000 4 100 17 10001 5 101 18 10010 6 110 19 10011 7 111 20 10100 8 1000 21 10101 9 1001 22 10110 10 1010 23 10111 11 1011 24 11000 12 1100 25 11001

Decimal to Binary Conversion

  • (^) Convert the decimal numberMethod-A Sucesive 192 into a binary number. Divisions

192/2= 96 with a remainder of 0 96/2= 48 with a remainder of 0 48/2= 24 with a remainder of 0 24/2= 12 with a remainder of 0 12/2= 6 with a remainder of 0 6/2= 3 with a remainder of 0 3/2= 1 with a remainder of 1 1/2= 0 with a remainder of 1 Write down all the REMAINDERS, backwards , and you have the binary number 11000000.

Example: Successive Subtracts

  • Successive subtraction is more intuitive

Convert the decimal number 213 into a binary number. First find the largest number that is a power of 2 that you can subtract from the original number. Repeat the process until there is nothing left to subtract. 213 - 128 = 85 128’s (2^7 ) used 1 85 - 64 = 21 64’s (2 6 ) used 1 *(32 cannot be subtracted from 21) 32’s (2^5 ) used 0 21-16 = 5 16’s (2^4 ) used 1 *(8 cannot be subtracted from 5) 8’s (2^3 ) used 0 5 - 4= 1 4’s (2^2 ) used 1 *(2 cannot be subtracted from 1) 2’s (2 1 ) used 0 1-1 = 0 1’s (2^0 ) used 1 Write down the 0s & 1s from top to bottom , and you have the binary number 11010101.

Binary to Decimal Conversion

  • Method-B Sucessive Additions
    • Make a “Power of 2” table. From right to left,

write the values of the power of 2 above each binary number. Then add up the values where a 1

exists. Ex: 10110101 2 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0

128 64 32 16 8 4 2 1

1 0 1 1 0 1 0 1

Fractional Decimal to Binary

  • 0.417 10 to N 2 by

Successive Subtract

  • Thus after getting to the High-Precision of 7 Sig-

Figs Find

  • Luckily Fractional

Conversions are not often need

**0. − 0 0x10 -

− 0.25 1x10 -

− 0.125 1x10 -

− 0 0x10 -

− 0.03125 1x10 -

− 0 0x10 -

− 0.007813 1x10 - 0.002937 rem**

  1. 41710 ≈ 0. (^01101012)

Base-

  • The Numbers in Base-

16 run 0→15 in Decimal

  • How do we WRITE

13 10 in Base-16 (ONE Symbol) when we’re used to 0→9?

  • Answer: use

LETTERS to represent 10→

HexaDecimal Numbering

  • Hexadecimal is the numbering system that is used to

represent MAC (Media Access Control) for Internet

addresses for example

  • Another Conversion Example: Express 2F5A 16 as a

decimal number 16 3 16 2 16 1 16 0

4096 256 16 1

2 F 5 A

(2 x 4096) + ([F]15 x 256) + (5 x 16) + ([A]10 x 1) = 12122

HexaDecimal Numbering

  • One hexadecimal character can represent any decimal

number between 0 and 15.

  • In binary, F (15 decimal) is 1111 and A (10 decimal) is 1010.
  • It follows that 4 bits are required to represent a single

hexadecimal value in binary.

  • A MAC address is 48 bits long (6 bytes), which translates to

(48/4 = ) 12 hexadecimal characters required to express a

MAC address.

  • You can check YOUR MAC-ID by typing cmd.exe in Windows-

7, and then type in the BlackBox ipconfig/all