Beruflich Dokumente
Kultur Dokumente
Universitas Trisakti
Number Systems (Sistem Bilangan)
Universitas Trisakti
Introduction
Decimal
Base-10 number system / radix of 10
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Binary
Base-2 number system / radix of 2
0, 1
Octal
Base-8 number system / radix of 8
0, 1, 2, 3, 4, 5, 6, 7
Universitas Trisakti
Introduction (cont…)
Hexadecimal
Base-16 number system / radix of 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Universitas Trisakti
Decimal
Universitas Trisakti
Binary
Universitas Trisakti
Octal
Universitas Trisakti
Hexadecimal
Universitas Trisakti
Decimal to Decimal
32410 = ... Decimal? 2510 = ... Decimal?
Universitas Trisakti
32410 = ... Binary?
Decimal to Binary
2510 = ... Binary?
Universitas Trisakti
Decimal to Hexadecimal
32410 = ... Hex? 65210 = ... Hex?
16710 = … Binary?
Universitas Trisakti
16710 = 101001112
Universitas Trisakti
101001012 = … Decimal?
101001112 = 2478
Universitas Trisakti
Binary to Octal / Octal to Binary
12410 = 11111002 = ... Octal?
Universitas Trisakti
Binary to Hex / Hex to Binary
101001112 = A716
Universitas Trisakti
Binary to Hex / Hex to Binary
69510 = 1010110111 = ... Hexadecimal?
Universitas Trisakti
Octal to Hex
2478 = A716
Universitas Trisakti
Hex to Octal
A716 = 2478
Universitas Trisakti
Binary Arithmetic
Universitas Trisakti
Binary Addition
Three-step algorithm:
STEP 1: Add the first (rightmost) column.
STEP 2: Record the units digits of the
column sum. If the sum, exceeds 1, carry
the 1 digit, to the next column.
STEP 3: If there are additional columns or if
there is a carry from Step 2, add the next
column and repeat Step 2. Otherwise stop.
Universitas Trisakti
Binary Addition (cont…)
Binary Addition Table:
+ 0 1
0 0 1
1 1 10
Universitas Trisakti
Binary Addition (cont…)
Universitas Trisakti
Binary Multiplication
Since there are only two digits in binary,
there are only two possible outcomes of
each partial multiplication:
If the digit in B is 0, the partial product is
also 0.
If the digit in B is 1, the partial product is
equal to A.
Universitas Trisakti
Binary Multiplication (cont…)
Universitas Trisakti
Binary Multiplication (cont…)
Universitas Trisakti
Binary Subtraction
Two-step algorithm:
STEP 1: If the lower (subtrahend) digit is
greater than the upper (minuend) digit,
borrow from the next column to the left.
STEP 2: Subtract the lower value from the
upper value.
In Step 1, “borrowing” means appropriating
with no intention of paying back.
Universitas Trisakti
Binary Subtraction (cont…)
Universitas Trisakti
Binary Subtraction (cont…)
Universitas Trisakti
Binary Division
Binary division is similar to its decimal
counterpart.
The procedure of binary division is the
same as that of decimal long division.
Universitas Trisakti
Binary Division (cont…)
Universitas Trisakti
Binary Division (cont…)
Universitas Trisakti