0% found this document useful (0 votes)
17 views4 pages

Introduction To Number Systems

Uploaded by

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

Introduction To Number Systems

Uploaded by

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

Introduction to Number Systems

• The traditional number system is known as positional number system.


• A number is signified as a sequence of digits.
• Every position of the digit has a weight associated with it.
• The value of any number = a weighted sum of the digits.
• For Example:
– Base-N Number System
• Base N
• N Digits: 0, 1, 2, 3, 4, 5, …, N-1
N n 1  N 4 N 3 N 2 N 1 N 0
• Example: (1045)N
d n 1  d 4 d 3 d 2 d1 d 0
• Digit do is the Least Significant Digit (LSD).
• Digit dn-1 is the Most Significant Digit (MSD).

Features of Numbering Systems


• The digits are successive.
• The number of digits is equal to the size of the base.
• Always zero is the first digit.
• Base number is not a digit.

Decimal Number System


p 1
• Generally, all are familiar with the decimal number system. D  d 10
i  n
i
i

• Base 10
• There are ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. 10 n 1 10 410310 210110 0
• Example: 104510 d n 1  d 4 d 3 d 2 d1 d 0

425.97  4 *10 2  2 *101  5 *100  9 *10 1  7 *10 2


Decimal Number System Contd…

left of the decimal point Right of decimal point • Anot


her Example:
725.194 is represented –

7 * 10^2 + 2 * 10^1 + 5 * 10^0 + 1 * 10^-1 + 9 * 10^-2 + 4 * 10^-3

= 7 * 100 + 2 * 10 + 5 * 1 + 1 * 0.1 + 9 * 0.01 + 4 * 0.001

= 700 + 20 + 5 + 0.1 + 0.09 + 0.004

= 725.194

Binary Number System 2n 1  24 23 22 2120


p 1
B b 2 i
i

• Base 2 system bn 1  b4 b3 b2 b1 b0 i  n
• There are two digits: 0 and 1.
• The 0 represents the an off state.
• The 1 represents the an on state. Base
• Example: 100101.0011
• Binary Digits are called Bits
Binary Number Scale
• nybble = 4 bits
• byte = 8 bits
• (short) word = 2 bytes = 16 bits
• (double) word = 4 bytes = 32 bits
• (long) word = 8 bytes = 64 bits
• 1K (kilo) = 1,024 bits
• 1M (mega) = (1K)*(1K) = 1,048,576 bits
• 1G (giga) = (1K)*(1M) = 1,073,741,824 bits

Hexadecimal Number System


• Base 16 system.

• There are sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.

• Example: EF5616


16n1 16416316 216116 0
Octal System
• Base 8 system.

• There are eight digits: 0, 1, 2, 3, 4, 5, 6, and 7.

• Example: 34073

• After 7, the next placeholder to the right begins with a “1”

• 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13 ...


Number: 4
Octal Representation 2 1

Sixty- Eights Ones


Fours
Value: 64*2 8*4 1*1

Exponential 2 1 0
Expression: 8 *2 8 *4 8 *1

BCD (Binary Coded Decimal) System

Number Systems Conversion: Why?


• Base conversion

– The people not only use base-10 number system, also use other bases For suitability (like, binary, octal, hexadecimal etc.)

– Therefore, need to know how to convert from one to another base system.

• A/D and D/A conversion

– In real world, the signals come in analog (continuous) format and good to know usually how they become 0’s and 1’s (visa
versa).

– The digital signal means discrete values.


• Digital computers

– I/O is digital form

– ASCII, decimal, etc.

• Internal representation is binary

– Information of process in bits (binary form).

Decimal to Binary Conversion


• The Division Algorithm is used to convert a decimal number to its equivalent binary form.

• Here, a decimal number is repeatedly divided by 2 and stores the quotient and remainder.

• Remainder digits (a sequence of zeros and ones) form the binary equivalent in least significant to most significant digit sequence.

Example: 6710 = (?)2

Step 1: 67 / 2 = 33 R 1 Divide 67 by 2. Record quotient in next row

Step 2: 33 / 2 = 16 R 1 Again divide by 2; record quotient in next row

Step 3: 16 / 2 = 8 R 0 Repeat again

Step 4: 8 / 2 = 4 R 0 Repeat again

Step 5: 4 / 2 = 2 R 0 Repeat again

Step 6: 2 / 2 = 1 R 0 Repeat again

Step 7: 1 / 2 = 0 R 1 STOP when quotient equals 0

10000112

Decimal to Binary Conversion


• Example: convert (333)10 =(?)2.

Decimal to octal Conversion


• Example: (44978)10 = (?)8

Decimal to Hexadecimal Conversion


Convert 83010 to its hexadecimal equivalent:

830 / 16 = 51 R14 = E in Hex Example:


1 0 –1
51 / 16 = 3 R3 63.4 = 6×8 + 3×8 + 4×8 = 51.5
8 10
3 / 16 = 0 R3 33E 1 0
16
A1 = 10×16 + 1×16 = 161
16 10
Binary to Decimal conversion
• For that purpose use the Multiplication Algorithm

• In this method, multiply each digit by its weighted position, and add each weighted values.

• Examples: (1100 1010)2=(?)10

• 1*2^7 + 1*2^6 + 0*2^5 + 0*2^4 + 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0


= 1 * 128 + 1 * 64 + 0 * 32 + 0 * 16 + 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1

=128 + 64 + 0 + 0 + 8 + 0 + 2 + 0

=202

 1012= 1×22 + 0×21 + 1×20 = 510

• Find –

(1011011.0110)2 = (?)10

(00110.11001)2 =(?)10

Binary to Hexadecimal Conversion


• The method for converting binary to hexadecimal is to use a substitution code.

• Each hex digit converts to 4 binary bits.

• Conversion from binary to octal/hex

– Binary: 10011110001

– Hex: 100 | 1111 | 0001=4F116 (Combine from LSB to MSB)


• 10 0101 1010 1111 . 1011 111 = 2 5 A F . B E
2 16

Binary to Octal Conversion


• The method for converting binary to octal is to use a substitution code.
• Each octal digit converts to 3 binary bits.
• Conversion from binary to octal/hex
– Binary: 10011110001
– Octal: 10 | 011 | 110 | 001=23618
• Find
(1 101 011 110 111)2 = (?)8

(11 011.101 1)2 = (?)8

Decimal to base-r Conversion: integer part


 Base-R to decimal conversion is a simple arithmetic in decimal.
 Though, decimal to base-R conversion using decimal arithmetic is harder.
 Here, repeatedly divide the number by base value R, taking remainder as result.
 Example: Convert 5710 to binary.
57 / 2 = 28 remainder 1 (LSB)
/2 = 14 remainder 0
/2 = 7 remainder 0
/2 = 3 remainder 1
/2 = 1 remainder 1
/2 = 0 remainder 1 (MSB)

Decimal to base-r Conversion: fractional part


• Successively multiply the digits by base R and store the integer part as result and chopping off integer part before the next iteration.
• Example: convert .310 to binary.
.3 * 2 = .6 integer part = 0 Convert?
.6 * 2 = 1.2 integer part = 1 (0.5)10 = (?)2
.2 * 2 = .4 integer part = 0 (73.426)10 = (?)2
.4 * 2 = .8 integer part = 0 (290.9)10 = (?)2
.8 * 2 = 1.6 integer part = 1
.6 * 2 = 1.2 integer part = 1, etc.

You might also like