Upload
anjali-bain
View
223
Download
0
Embed Size (px)
Citation preview
PEMBAGIAN BILANGAN BULAT BINER
BAGAIMANA MEMBAGI BILANGAN DALAM ARITMATIKA KOMPUTERBIL. BULAT POSITIF DAN BIL. BULAT NEGATIF
Riky 2208 4576
Yohanes J.N. 2208 4539
Andi .S 2204 3575
Anton .M 2202 3039
ReviewReviewRepresentation of there 3 types
integer sign :1. Sign-magnitude2. Complement 13. Complement 2
Sign-Magnitude Representation
Binary Decimal
0111 +7
0110 +6
0101 +5
0100 +4
0011 +3
0010 +2
0001 +1
0000 +0
1000 -0
1001 -1
1010 -2
1011 -3
1100 -4
1101 -5
1110 -6
1111 -7
Sign-Magnitude uses the most-significant-bit as the sign bit. The rest of the bits represent the number in the "Binary" format.
1’S & 2’S COMPLEMENT
Binary Division
Binary DivisionTo perform binary division follow the following steps:1. Align the divisor (Y) with the most significant end of the dividend. Let the portion ofthe dividend from its MSB to its bit aligned with the LSB of the divisor be denoted X.2. Compare X and Y.
a) If X >= Y, the quotient bit is 1 and perform the subtraction X-Y.b) If X < Y, the quotient bit is 0 and do not perform any subtractions.
3. Shift Y one bit to the right and go to step 2.
Binary DivisionBinary Division
Another example :
Quotient
Reminder
More examples
4. 8 : -17
5. -40 : -5
6. -125 : 20
1. 16 : 4
2. 7 : 21
3. 23 : -8
Terima kasihTerima kasih