Professional Documents
Culture Documents
Pertemuan-3: Aritmatika Biner
Pertemuan-3: Aritmatika Biner
Aritmatika Biner
A. COMPLEMENT
a. Binary 1’s complement for
substraction
To take the 1’s complement of binary number,
Sweply change each bit. The 1’s complement
of 1 is 0 and vice versa. The 1’s complement
of 1001010 is 0110101. To substract 1’s
complement :
1. Take the 1’s complement of the subtrahend
( right/bottom number )
2. Add the 1’s complement to the minuend
( left/top number )
3. Overflow indicated that the answers is
positive. Add the overflow to the least
significant bit. This operation is called end –
around carry ( EAC ).
Lanjutan …
Sign bit +
No overflow
jadi true mag 01110110 (+118)
4. Subtract 10001010 11111100
Jawab. 10001010 2’sc 10001010
- 11111100 + 00000100
10001110
Jawab :
5 4 3 7
0101 0100 0011 0111
Contoh !
1. Ubah 00101101 kedalam bilangan decimal
menggunakan sistem signed 2’s C.
0 0 1 01101
Sign bit 6432168421
32 + 8 + 4 +1 = 45
Jadi true magnitude adalah +45
Soal latihan !
1. Tunjukkan bilangan biner 8 bit signed 2’sc
untuk :
a. -75 c. -150
b. +47 d. +93
2. Add bilangan 8 bit signed 1’sc dan 2’sc
a. 00011110 + 00111001
b. 00110011 + 11001000
3. Kurangkan bilangan 8 bit signed 1’sc dan
2’sc
a. 00111001 – 11001110
b. 10101010 - 10011011