[PDF] [PDF] Numbering Systems The Decimal System The Decimal System The

The Binary System ▫ What (decimal) value correspond to 100101 2 ? ▫ From the definition of positional numbering system: to convert a base-n value to base 



Previous PDF Next PDF





[PDF] NUMBER SYSTEMS

number system, e g , it may be required to convert a decimal number to binary or octal or hexadecimal The reverse is also true, i e , a binary number may be 



[PDF] Lecture 2 Number Systems and Conversion

i e Each digit is weighted by integer powers of 10 10 is known as the radix or of the decimal system 0 1 2 3 4 5 6 7 8 9 



[PDF] NUMBER SYSTEM CONVERSIONS - ipsgwaliororg

A) Divide the Number (Decimal Number) by the base of target base system (in which you want to convert the number: Binary (2), octal (8) and Hexadecimal (16 )) 



[PDF] 3 Convert a number from one number system to another

simply by summing together the weights of the various positions in the binary number which contains a 1 Example 1: Convert 110112 to its decimal equivalent 1 1 



[PDF] CHAPTER 3 Numbers and Numeral Systems - UiO

We usually represent natural numbers in the decimal numeral system, but in systems We will also give a simple method for converting a number from its



[PDF] Binary Decimal Octal and Hexadecimal number systems

(see the chart down below) •Numbers are expressed as powers of 8 Conversion of octal to decimal ( base 8 to base 10) Example: convert (632)8 to 



[PDF] Numbering Systems The Decimal System The Decimal System The

The Binary System ▫ What (decimal) value correspond to 100101 2 ? ▫ From the definition of positional numbering system: to convert a base-n value to base 



[PDF] Conversion of Binary, Octal and Hexadecimal Numbers

Replace each hexadecimal digit with the corresponding 4-bit binary string 8B16 = 1000 1011 = 100010112 Page 2 Conversion of Decimal Numbers



[PDF] Conversion of Binary, Octal and Hexadecimal Numbers - UCR CS

Replace each hexadecimal digit with the corresponding 4-bit binary string 8B16 = 1000 1011 = 100010112 Page 2 Conversion of Decimal Numbers

[PDF] fractional octave analysis

[PDF] fragile x grey zone pregnancy

[PDF] fragile x pcr negative

[PDF] fragile x pcr results gender

[PDF] fragile x syndrome challenging behaviour

[PDF] fragile x syndrome diagnosis age

[PDF] fragile x syndrome diagnosis code

[PDF] fragile x syndrome diagnosis treatment and research

[PDF] fragile x syndrome diagnostic and carrier testing

[PDF] fragile x syndrome diagnostic testing

[PDF] fragile x syndrome early intervention

[PDF] fragile x syndrome management

[PDF] fragile x syndrome mayo clinic

[PDF] fragile x syndrome nursing care plan

[PDF] fragile x syndrome occupational therapy

Numbering Systems

Ver. 1.4

© 2010 - Claudio Fornaro2

The Decimal System

Consider value 234, there are:

2 hundreds

3 tens

4 units

that is: 2 x 100 + 3 x 10 + 4 x 1 but 100, 10, and 1 are all powers of 10 so value 234 can be written as:

2 x 10

2 + 3 x 10 1 + 4 x 10 03

The Decimal System

That recurring number 10is called the base

of the numbering system

The usual numbering system is then

called base 10 or decimal

The decimal system is a

positional numbering system, this means that the position of each digit implies the multiplication to a corresponding power of the base (the weight of that position)4

The "base-n" System

The base of a numbering system can be

any integer value greater than 1

Digits can have values from 0 to n

-1 (e.g. the base-10 system has 10 possible digits, from 0 to 9, for bases >10 see the hexadecimal system)

When not clear from the context, the

base of a value must be indicated with a subscript value: 234 10 5

The "base-n" System

Base-n systems are positional

The same value is expressed in

different ways depending on the numbering system used

We want to convert a value from a

generic base n to base 10 because we are acquainted only with the latter

Some base-n numbering systems are

more suited for special purposes 6

The Binary System

Binary means base-2

There are only 2 digits: 0 and 1

The digits of a binary value are called bits

(bit comes from "BInary digiT")

A value expressed in the binary system

is a sequence of zeroes and ones:

100101

2

The binary system is suited for

computers 7

The Binary System

What (decimal) value correspond to

100101

2

From the definition of positional

numbering system: to convert a base-n value to base 10, each digit must be multiplied by the power of the base (2 in this case) corresponding to the digit position 8

The Binary System

100101

2 = 1 x 2 5 + 32 + 0 x 2 4 + 0 + 0 x 2 3 + 0 + 1 x 2 2 + 4 + 0 x 2 1 + 0 + 1 x 2 0 = 1 = 37

105 4 3 2 1 0

write powers right to left on each digit starting from unit 9

The Binary System

A "bit" is a small quantity (!), so many

bits are grouped together to build a more significant entity

A byteis a sequence of 8 bits

10100011

00101001

10

The Binary System

Other bit groupings are:

A nibbleis composed of 4 bits

A wordis composed of 2 bytes (16 bits)

A double word(dword) is composed of 2

words (4 bytes, 32 bits)

A quad word(qword) is composed of 4

words (8 bytes, 64)

The term

word has a completely different meaning when dealing with computer architecture 11

The Binary System

For every bit sequence:

MSB:

Most Significant Bit

The leftmost bit is the most important of

the sequence because it multiplies the highest power of the base1

0010010...10101001

LSB:

Least Significant Bit

The rightmost bit is the less important of

the sequence because it multiplies the lowest power of the base (0)

10010010...1010100

1 12

The Octal System

There are 8 digits:

from 0 to 7 (no 8 nor 9 digits!)

Example

3642
8

Conversion to base 10

3642
8 = 3 x 8 3 + 6 x 8 2 + 4 x 8 1 + 2 x 8 0 = 1954 10 384
8 = NOT AN OCTAL NUMBER (8?) 3210
13

The Hexadecimal System

16 digits: 0 to F (subscript 16 or H)

The first 10 digits are the same as the

decimal system, the other 6 digit symbols are taken from the alphabet: A H 10 10 digit "A", NOT letter "A") B H 11 10 C H 12 10 D H 13 10 E H 14 10 F H 15 10 14

The Hexadecimal System

C1B8 H = 12 x 16 3 + 1 x 16 2 + 11 x 16 1 + 8 x 16 0 = 49592

103 2 1 0

15

Doubling and Dabbling

Fast conversion to base 10 of small

binary values (it could be used with other bases and big values, but memory computation is not such effective): multiply the first (leftmost) bit (MSB) by the base (2) and add the second bit multiply the value just calculated by the base and add the third bit continue until the LSB is added 16

Doubling and Dabbling

Example

100101

2 leftmost bit (MSB) is 1 1x 2 = 2 + 0= 2 2 x 2 = 4 + 0= 4 4 x 2 = 8 + 1= 9 9 x 2 = 18 + 0 = 18

18 x 2

= 36 + 1= 37 17

Conversion from base 10 to n

For integer numbers only:

Divide the value by the target base,

computing an integer division, you get a quotient (result) and a remainder

Divide the previous quotient by the target

base, you get a quotient and a remainder

Continue until the quotient is zero

Write (from left to right) the remainders

from the lastcomputed to the firstone 18

Conversion from base 10 to n

Example: convert 37

10 to base 2 37 2

118 2

09 2 14 2 02 2 01 2 10 divisor dividendremainder quotient remainders

100101

19

Conversion from Base n to m

Given a number in base

n , to convert it to base m convert the number from base n to base 10 convert the just calculated number from base 10 to base m

It is always possible to pass through the

intermediate base 10, but sometimes this is not the easiest and fastest way 20

Conversion Exercises

Convert the values as requested

106
10 2 35
10 2 64
10 2 45
6 2 17 7 2 23
8 2 207
10 2 B2 16 10 47
8 10 73
10 8 44
7 3

101001

2 10 11111
2 10 10000
2 10 10000
2 4 161
10 16 21

Conversion Exercises

Convert the values as requested

106
10

1101010

2 35
10

100011

2 64
10

1000000

2 45
6 11101
2 17 7 IMP. 23
8 10011
2 207
10

11001111

2 B2 16 178
10 47
8 39
10 73
10 111
8 44
7 1012
3

101001

2 41
10 11111
2 31
10 10000
2 16 10 10000
2 100
4 161
10 A1 16 22

Conversion from Bases 2

n

To convert a number from base

n to base m , when BOTH n and m are powers of 2 (e.g. 2,4,8,16), it is easier and faster to pass through base 2

Every digit in a 2

x base requires at least x bits (possibly starting with zeroes): 5 8 = 101 2 2 8 = 010 2 B 16 = 1011 2 2 16 = 0010 2 23

Conversion from Bases 2

n

A number in base-2

x can be converted to base 2 by simply substituting each of its digits with the corresponding binary value (each composed of x bits): 52
8 = [101][010] 2 = 101010 2 B2 16 = [1011][0010]quotesdbs_dbs17.pdfusesText_23