Signed and Unsigned Numbers
Signed and Unsigned Numbers
2s Complement form
1s complement form
2s complement form
(13)
1
(-13)
+5
+2
+7
0101
1110
0011
+5
-2
+3
1011
1110
1001
-5
-2
-7
1011
0010
1101
-5
+2
-3
-5
-2
-7
Signed Binary
0101
0010
0111
+5
+2
+7
1101
1010
10111
-5
-2
-7
+5
-2
+3
0101
1010
1111
+5
-2
+3
1011
-5
0010 +2
1101 -3
1101
0010
1111
-5
+2
-3
Base 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Representing Binary in compact form
11011000001102 = 1B06 H
Counting in Hexadecimal
Decimal Binary
Hexadecimal
Decimal Binary
Hexadecimal
0000
1000
0001
1001
0010
10
1010
0011
11
1011
0100
12
1100
0101
13
1101
0110
14
1110
0111
15
1111
Counting in Hexadecimal
Decimal HexaDecimal
16
10
Decimal HexaDecimal
24
18
Decimal HexaDecimal
32
20
17
11
25
19
33
21
18
12
26
1A
34
22
19
13
27
1B
35
23
20
14
28
1C
36
24
21
15
29
1D
37
25
22
16
30
1E
38
26
23
17
31
1F
39
27
Binary-Hexadecimal Conversion
Decimal-Hexadecimal Conversion
Decimal-Hexadecimal Conversion
Hexadecimal Addition
Carry generated
Hexadecimal Subtraction
Borrow weight 16
Repeated Division by 16
Number
Quotient
Remainder
2096
131
131
Sum-of-Weights
CA02
(C x 163) + (A x 162) + (0 x 161) + (2 x 160)
(12 x 163) + (10 x 162) + (0 x 161) + (2 x 160)
(12 x 4096) + (10 x 256) + (0 x 16) + (2 x 1)
49152 + 2560 + 0 + 2
51714
Hexadecimal Addition
Carry
+
1
2AC6
92B5
BD7B
6+5=11d Bh
C+B=23d 17h
A+2+1=13d Dh
2+9=11d Bh
Hexadecimal Subtraction
Borrow
-
111
92B5
2AC6
67EF
21-6=15d Fh
26-C=14d Eh
17-A=7d 7h
8-2=6d 6h
Base 8
0, 1, 2, 3, 4, 5, 6, 7
Representing Binary in compact form
11011000001102 = 154068
Counting in Octal
Decimal
0
1
2
3
4
5
6
7
Binary
000
001
010
011
100
101
110
111
Octal
0
1
2
3
4
5
6
7
Counting in Octal
Decimal Octal Decimal Octal
8
10
16
20
9
11
17
21
Decimal Octal
24
30
25
31
10
11
12
13
14
15
26
27
28
29
30
31
12
13
14
15
16
17
18
19
20
21
22
23
22
23
24
25
26
27
32
33
34
35
36
37
011010110101110010110
011 010 110 101 110 010 110
3 2 6 5 6 2 6
1011011101001
1 011 011 101 001
001 011 011 101 001
1 3 3
5 1
1726
001 111 010 110
Decimal-Octal Conversion
Decimal-Octal Conversion
Octal Addition
Carry generated
Octal Subtraction
Borrow weight 8
Repeated Division by 8
Number
Quotient
Remainder
2075
259
(O0)
259
32
(O1)
(O2)
(O3)
Sum-of-Weights
4033
(4 x 83) + (0 x 82) + (3 x 81) + (3 x 80)
(4 x 512) + (0 x 64) + (3 x 8) + (3 x 1)
2048 + 0 + 24 + 3
2075
Octal Addition
Carry
1
7602
+ 5771
15573
2+1=3d 3O
0+7=7d 7O
6+7=13d 15O
1+7+5=13d 15O
Octal Subtraction
Borrow
-
11
7602
5771
1611
2-1=1d 1O
8-7=1d 1O
13-7=6d 6O
6-5=1d 1O
Alternate Representations
BCD Code
BCD Addition
Gray Code
Alternate Representations
Decimal
0
1
2
3
4
BCD
0000
0001
0010
0011
0100
Decimal
5
6
7
8
9
BCD
0101
0110
0111
1000
1001
BCD Addition
BCD Addition
0010 0011
0100 1000
0110 1011
0110
0111 0001
Alphanumeric Code
ASCII Code
Numbers 0 to 9
ASCII 0110000 (30h) to 0111001 (39h)
Alphabets a to z
ASCII 1100001 (61h) to 1111010 (7Ah)
Alphabets A to Z
ASCII 1000001 (41h) to 1011010 (5Ah)
Control Characters
ASCII 0000000 (0h) to 0011111 (1Fh)
Alphanumeric Code
Error Detection
Original data
10011010
With Odd Parity 110011010
1-bit error
110111010
Number of 1s even indicates 1-bit error
2-bit error
110110010
Number of 1s odd no error indicated
3-bit error
100110010
Number of 1s even indicates error