CH 1 Number Systems and Conversions - 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Introduction

Number systems and Conversion (A)

EE & IT AU
Hasan Zidan

1
Outline

Logic Design (ELE 202)


– Prerequisite,
IT Fundamentals COM 111
– Textbook and references
Fundamentals of Logic Design 7th Edition
Charles Roth, Larry Kinney
– Office/contact hours
Announced latter
– Assessment
Final Exam --%
Midterm Exam --%
Laboratory , Tutorial , Project 30%
Tests (1 &2) --%

2
Digital Systems Vs. Analog Systems

Digital systems Analog systems


• Discrete quantity • Continuous quantity
• Output is exactly correct • Output error exist
• Ease of modifications, redesign • Not easy to modify

Digital systems
Used in computation and data processing, control
systems, communications, and measurements.

3
Design of Digital Systems

Top-Down Approach
Systems Design
Digital Computer

Logic Design
Gates, SSI, latches, Flip-Flop’s OUR GOAL

Circuit Design
Resistors, Diodes, and Transistors

4
Numbering Systems
• The Decimal system (Base 10) is the most familiar to
all of us. A digit in Base 10 ranges from 0 to 10-1 (9).

• A digit in Base 2 ranges from 0 to 1 (Binary system).


A digit in Base 2 is also called a ‘bit’.

• A digit in Base 16 can range from 0 to 16-1 (15)


(0,1,2,……,8,9,A,B,C,D,E,F). Use letters A-F to
represent values 10 to 15. Base 16 is also called
Hexadecimal or just ‘Hex’.
• A digit in Base 8 can range from 0 to 8-1 (7). Base 8
is also called Octal.

A digit in Base R can range from 0 to R-1.

5
Binary Representation

• The basis of all digital data is Binary representation.


• Binary --> means ‘TWO’
– 1, 0
– True, False
– Hot, Cold
– ON, OFF
• For real world problems: One must be able to handle more
than just two values
– 1, 0, 565
– True, False, Maybe
– Hot, Cold, Warm
– On, Off, Leaky
6
Positional Notation

Value of number is determined by multiplying each digit


by a weight and then summing. The weight of each digit
is a POWER of the BASE and is determined by position.
953.7810 = 9 * 102 + 5 * 101 + 3 * 100 + 7 * 10-1 + 8 *10-2
= 900 + 50 + 3 + .7 + .08
= 953.78
1011.112 = 1*23 + 0*22 + 1*21 + 1*20 + 1*2-1 + 1*2-2
= 8 + 0 + 2 + 1 + 0.5 + 0.25
= 11.75
A2F16 = 10 * 162 + 2 *161 + 15 *160
= 10 * 256 + 2 * 16 + 15 * 1
= 2560 + 32 + 15 = 2607 7
Conversion of Any Base to Decimal

Converting from ANY base to decimal is done by


multiplying each digit by its weight and summing.

Binary to Decimal
1011.112 = 1*23 + 0*22 + 1*21 + 1*20 + 1*2-1 + 1*2-2
= 8 + 0 + 2 + 1 + 0.5 + 0.25
= 11.75

Hex to Decimal
A2F16 = 10*162 + 2*161 + 15*160
= 10 * 256 + 2 * 16 + 15 * 1
= 2560 + 32 + 15 = 2607

8
Conversion of Decimal No. to ANY Base
Divide Number N by base R until quotient is 0.
Remainder at EACH step is a digit in base R, from Least
Significant digit to Most significant digit.

Convert 53 to Binary
53/2 = 26, rem = 1 Least Significant Digit
26/2 = 13, rem = 0
13/2 = 6 , rem = 1
6 /2 = 3, rem = 0
3/2 = 1, rem = 1
Most Significant Digit
1/2 = 0, rem = 1
53 = 110101
= 1*25 + 1*24 + 0*23 + 1*22 + 0*21 + 1*20
= 32 + 16 + 0 + 4 + 0 + 1 = 53 9
LSD & MSD

53 = 110101

Most Significant Digit (has Least Significant Digit (has


weight of 25 or 32). For weight of 20 or 1). For
base 2, also called Most base 2, also called Least
Significant Bit (MSB). Significant Bit (LSB).
Always LEFT MOST digit. Always RIGHT MOST digit.

10
More Conversions

Convert the Decimal number 53 to Hex.

53/16 = 3, rem = 5
3 /16 = 0 , rem = 3
5310 = 3516
= 3 * 161 + 5 * 160
= 48 + 5
= 5310

11
Hex (base 16) to Binary Conversion

Each Hex digit represents 4 bits. To convert a Hex


number to Binary, simply convert each Hex digit to its
four bit value.
Hex Digits to binary Hex Digits to binary (cont)
0 = 0000 9 = 1001
1 = 0001 A = 1010
2 = 0010 B = 1011
3 = 0011 C = 1100
4 = 0100 D = 1101
5 = 0101 E = 1110
6 = 0110 F = 1111
7 = 0111
8 = 1000
12
What do you need to Know?

 Convert Hex and Binary numbers to Decimal

 Convert Decimal numbers to Hex and Binary

 Convert Hex to Binary, Binary to Hex

 N Binary digits can represent 2N values, 0 to 2N -1.

13

You might also like