Professional Documents
Culture Documents
02.machine Level Representation of Data
02.machine Level Representation of Data
Edited on Mac2020
LESSON OUTCOMES
Upon completion of this chapter, students should understand about:
Words Doubleword
16 bits grouped together is 32 bits grouped together is
called a word called a doubleword
Equivalent to 4 bytes
system of system of
posiAonal notaAon posiAonal
based on powers DECIMAL BINARY notaAon based
of 10. on powers of 2.
system of system of
posiAonal notaAon HEXADEC
OCTAL posiAonal
based on powers IMAL notaAon based
of 8. on powers of 16
2.1 Numeric Conversion
BINARY NUMBERS
Base 2: 0, 1
Converting Base 10 to Base 2
A decimal number 4210 can be converted to a
binary number by dividing the number by 2:
Converting Base 10 to Base 2
A decimal number 8710 can be converted to a
binary number by dividing the number by 2:
Converting Base 2 to Base 10
A binary number 11001112 is converted to a decimal numbers by
summing the weights of various positions in the binary number which
contains a 1.
BINARY NUMBERS : exercises
Convert the following number:
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
OCTAL NUMBERS
Each octal digit can be represented by a
3-bit binary number as shown below:
OCTAL NUMBERS
Each octal digit can be represented by a
3-bit binary number as shown below:
A binary number is converted into an octal number by taking groups of 3
bits, starting from LSB, and replacing them with an octal digit.
OCTAL NUMBERS
Each octal digit can be represented by a
3-bit binary number as shown below:
A binary number is converted into an octal number by taking groups of 3
bits, starting from LSB, and replacing them with an octal digit.
OCTAL NUMBERS : exercises
Convert the following number:
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
Converting Base 10 to Base 16
A decimal number can be converted to hex number by
successively dividing the number by 16 as follows:
Converting Base 10 to Base 16
A decimal number can be converted to hex number by
successively dividing the number by 16 as follows:
HEXADECIMAL NUMBERS
To convert a hex number to a decimal number, multiply each hex value
by the weight of the digit and sum the results.
HEXADECIMAL NUMBERS
Conversion from hex to binary is very straightforward. Each hex
digit is replaced by 4-bit binary number.
HEXADECIMAL NUMBERS
Another example of the conversion: Hexadecimal à Binary
HEXADECIMAL NUMBERS
A binary number is converted into a hex number by taking groups of 4
bits, starting from LSB, and replacing them with a hex digit.
HEXADECIMAL NUMBERS
: exercises
Convert the following number:
574 8 = 2 = 16 = 10
AF2 16 = 2 = 8 = 10
652 8 = 2 = 16 = 10
2.2 Fractional Conversions
Fractions
Carry Carry
1 1 1 1 1 1 1
4568 777148
+ 1238 + 768
6018 1000128
Remember!!
Digits in Octal are 0
to 7.
Addition
AddiAon in Hexadecimal
0
Carry
1 1
7A616 9
+ 2BA16 10
11
A
B
A6016 12 C
13 D
14 E
15 F
Addition
AddiAon in Binary
Carry Carry
1 1 0 1 1 1
1112 7 001112 7
+ 102 + 2 + 101012 +21
10012 9 111002 28
Subtraction
SubtracAon in Octal
+8 Borrow
2 4 +8
If you borrow
3568 3568 in Octal,
- 1578 - 1578 the value
borrowed
1778 1778 is 8.
Subtraction
SubtracAon in Hexadecimal
0
Borrow
B +16 9 +16
C9AD16 C9AD16 9
10 A
- 5A8F16 - 5A8F16 If you borrow
in Octal,
the value
11 B
12 C
6F1E16 6F1E16 borrowed
Is 16.
13 D
14 E
15 F
Subtraction
SubtracAon in Binary
Borrow
1 1
0 10 10 10
110002 110002
- 1112 - 1112 If you borrow
in Octal,
the value
100012 100012 Borrowed
is 210 or 10 .
2
2.5 Floating Point format (IEEE
754 standard single precision)
Floating Point
ScienAfic NotaAon