Anda di halaman 1dari 1

Two's complement division is repeated 2's complement subtraction.

The 2's complement of the divisor is calculated, then added to the dividend. For the next subtraction cycle, the quotient replaces the dividend. This repeats until the quotient is too small for subtraction or is zero, then it becomes the remainder. The final answer is the total of subtraction cycles plus the remainder Pembagian twos complement Pengurangan berulang Divisor dikomplemenkan Tambahkan dengan dividendnya Hasilnya, letakkan sebagai devidend Ulangi sampai menghasilkan sisa /reminder terkecil Hasil akhir adalah total pengurangan ditambah sisa Jika tandanya sama, maka hasilnya adalah + Jika tandanya berbeda, maka hasilnya adalah (twos complemen) Contoh

8/-3 = -2 sisa 2

0000 1000 8 +1111 1101 -3 1111 0101 = - 5 q=0000 0001 1111 0101 +1111 1101 1111 0010 = 2 q=0000 0001+1 = 0000 0010 Karena tanda devider dan deviden berbeda maka hasilnya adala twos compemen q Q = 1101+1 = 1110 = -2 R=2 9/-3 0000 1001 = 9 1111 1101 = -3 0000 0110 = 6 q =0001 0000 0110 1111 1101 0000 0011 q =0001+1 = 0010

0000 0011 1111 1101 0000 0000=0 q =00010 +1= 0011 Karena tanda devider dan devidend maka hasilnya adalah twos compement q q = 1101 (-3) dengan ramainder = 0 15/-4 0000 1111 1111 1100 0000 1011 0000 1011 1111 1100 0000 0111 0000 0111 1111 1100 0000 0011

q=0000 0001

q=0000 0010

q=0000 0011 a=3

1111 1101 = -3

Anda mungkin juga menyukai