Introduction
Number System Base.
Table : Number System Conversion
Binary ( X2
)
|
Decimal (
X10 )
|
Hexadecimal
( X16 )
|
0000
|
0
|
0
|
0001
|
1
|
1
|
0010
|
2
|
2
|
0011
|
3
|
3
|
0100
|
4
|
4
|
0101
|
5
|
5
|
0110
|
6
|
6
|
0111
|
7
|
7
|
1000
|
8
|
8
|
1001
|
9
|
9
|
1010
|
10
|
A
|
1011
|
11
|
B
|
1100
|
12
|
C
|
1101
|
13
|
D
|
1110
|
14
|
E
|
1111
|
15
|
F
|
10000
|
16
|
10
|
REMEMBER THIS!!
210
|
29
|
28
|
27
|
26
|
25
|
24
|
23
|
22
|
21
|
20
|
1024
|
512
|
296
|
128
|
64
|
32
|
16
|
8
|
4
|
2
|
1
|
20
|
2-1
|
2-2
|
2-3
|
2-4
|
2-5
|
1
|
0.5
|
0.25
|
0.125
|
0.0625
|
0.03125
|
Sign Integer Representation
~
represent negative (-ve) values, computer system allocate the high order bit to indicate the sign of
value.
~ 0 (+ve
sign) ; 1 (-ve sign)
high
order bit :
- left most
in a byte . called the most significant
bit.
-
remaining bits contain the value of the number.
3 ways
signed binary numbers been expressed:
-
signed
magnitude
-
1’s
complement
-
2’s
complement
Negative Number Conversion
Second complement
Binary Addition
The binary number operation rules (addition)
Binary Rules
|
Sum
|
Carry
|
0 + 0 = 0
|
0
|
0
|
0 + 1 = 1
|
1
|
0
|
1 + 0 = 1
|
1
|
0
|
1 + 1 = 1
|
0
|
1
|
The binary number operation rules (subtraction)
Binary Rules
|
Sum
|
Borrow
|
0 – 0 = 0
|
0
|
0
|
0 – 1 = 1
|
1
|
10
|
1 – 0 = 1
|
1
|
0
|
1 – 1 = 1
|
0
|
1
|
Binary Multiplication
The binary number operation rules (multiplication)
Binary Rules
|
Multiply
|
0 x 0 = 0
|
0
|
0 x 1 = 1
|
0
|
1 x 0 = 1
|
0
|
1 x 1 = 1
|
1
|
Hexadecimal Addition
If sum number
> 1510, the amount of the sum that exceeds 1610
will carry a 1 to
the next column.
Hexadecimal
Subtraction
1st step
: convert the hexadecimal number to
binary number
2nd step : take the 2nd complement of
the binary number and change it back to hexadecimal number
3rd step : add both numbers to get the result
Post by Nurul Syifa Binti Zainudin (B031210018)
No comments:
Post a Comment