Binary:: Base 2 and Base 10 Learn
Binary:: Base 2 and Base 10 Learn
Binary:: Base 2 and Base 10 Learn
Let's look at base-two, or binary, numbers. How would you write, for instance,
1210 ("twelve, base ten") as a binary number? You would have to convert to
base-two columns, the analogue of base-ten columns. In base ten, you have
columns or "places" for 100 = 1, 101 = 10, 102 = 100, 103 = 1000,
and so forth. Similarly in base two, you have columns or "places" for 20 = 1,
21 = 2, 22 = 4, 23 = 8, 24 = 16, and so forth.
The first column in base-two math is the units column. But only "0" or "1" can
go in the units column. When you get to "two", you find that there is no single
solitary digit that stands for "two" in base-two math. Instead, you put a "1" in
the twos column and a "0" in the units column, indicating "1 two and 0 ones".
A "three" in base two is actually "1 two and 1 one", so it is written as 112.
"Four" is actually two-times-two, so we zero out the twos column and the
units column, and put a "1" in the fours column; 410 is written in binary form
decimal binary
(base 10) (base 2)
0 0 0 ones
1 1 1 one
2 10 1 two and zero ones
3 11 1 two and 1 one
1 four, 0 twos, and 0 ones
4 100
1 four, 0 twos, and 1 one
5 101
1 four, 1 two, and 0 ones
6 110
1 four, 1 two, and 1 one
7 111
1 eight, 0 fours, 0 twos, and 0 ones
8 1000
1 eight, 0 fours, 0 twos, and 1 one
9 1001
1 eight, 0 fours, 1 two, and 0 ones
10 1010
1 eight, 0 fours, 1 two, and 1 one
11 1011
1 eight, 1 four, 0 twos, and 0 ones
12 1100
1 eight, 1 four, 0 twos, and 1 one
13 1101
1 eight, 1 four, 1 two, and 0 ones
14 1110
1 eight, 1 four, 1 two, and 1 one
15 1111
1 sixteen, 0 eights, 0 fours, 0 twos, and
16 10000
0 ones
Converting between binary and decimal numbers is fairly simple, as long as you
remember that each digit in the binary number represents a power of two.
I will list the digits in order, and count them off from the RIGHT, starting with
zero:
1 0 1 1 0
digits:
0 1 0 1
Numbering
for the 8 7 6 5
base
4 3 2 1 0
nombor
diatas >
The first row above (labelled "digits") contains the digits from the binary
number; the second row (labelled " numbering") contains the power of
2 (the base) corresponding to each digits. I will use this listing to
convert each digit to the power of two that it represents:
= 256 + 64 + 32 + 4 + 1
= 357
As you can see, after dividing repeatedly by 2, I ended up with these remainders:
Base 4
I will do the same division that I did before, keeping track of the
remainders. (You may want to use scratch paper for this.)
Note: Once I got "3" on top, I had to stop, because four cannot divide
Reading the numbers off the division, I get that 80710 converts to
302134.
Base 7
I do the division:
I will list the digits, and count them off from the RIGHT, starting at
zero:
5 3 6
digits:
2 4
4 3 2
numbering:
1 0
Octal
An older computer base system is "octal", or base eight. The digits in octal
math are 0, 1, 2, 3, 4, 5, 6, and 7. The value "eight" is written as "1
I will follow the usual procedure, counting off the digits from the RIGHT,
starting at zero:
5 4
digits:
5
2 1
numbering:
0
Hexadecimal [perenambelasan]
If you work with computer programming or computer engineering (or computer graphics,
about which more later), you will encounter base-sixteen, or hexadecimal, math.
As mentioned before, decimal math does not have one single solitary digit that
represents the value of "ten". Instead, we use two digits, a 1 and a 0: "10". But in
hexadecimal math, the columns stand for multiples of sixteen! That is, the first column
stands for how many units you have, the second column stands for how many sixteens,
the third column stands for how many two hundred fifty-sixes (sixteen-times-sixteens),
and so forth.
In base ten, we had digits 0 through 9. In base eight, we had digits 0 through 7. In
base 4, we had digits 0 through 3. In any base system, you will have digits 0
through one-less-than-your-base. This means that, in hexadecimal, we need to have
"digits" 0 through 15. To do this, we would need single solitary digits that stand for
the values of "ten", "eleven", "twelve", "thirteen", "fourteen", and "fifteen". But we
don't. So, instead, we use letters. That is, counting in hexadecimal, the sixteen
"numerals" are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
"thirteen", E is "fourteen", and "F" is fifteen. It is this use of letters for digits that
makes hexadecimal numbers look so odd at first. But the conversions work in the usual
manner.
Translate :
Jika anda bekerja dengan pengaturcaraan komputer atau teknik komputer (atau
komputer grafik, tentang yang lebih kemudian), anda akan menemui asas-enam belas,
atau Perenambelasan, matematik.
Seperti disebutkan sebelumnya, matematik perpuluhan tidak memiliki satu pun soliter
angka yang merupakan nilai dari "sepuluh". Sebaliknya, kami menggunakan dua digit, 1
dan 0: "10". Tetapi dalam matematik Perenambelasan, medan berdiri untuk kelipatan
enam belas! Ertinya, medan pertama singkatan dari berapa unit yang anda miliki, medan
kedua singkatan berapa sixteens, medan ketiga singkatan berapa banyak dua ratus lima
puluh-berenam (enam belas-kali-sixteens), dan sebagainya.
Dalam sepuluh dasar, kami harus angka 0 hingga 9. Dalam pangkalan lapan, kami harus
angka 0 hingga 7. Dalam pangkalan 4, kami harus angka 0 hingga 3. Dalam setiap
sistem asas, anda akan mempunyai nombor 0 sampai satu-kurang dari-anda-base-. Ini
bermakna bahawa, dalam Perenambelasan, kita perlu memiliki "angka" 0 hingga 15.
Untuk melakukan ini, kita perlu soliter digit tunggal yang berdiri untuk nilai dari
"sepuluh", "sebelas", "dua belas", "tiga belas", "empat belas", dan "lima belas". Tapi kita
tidak. Jadi, sebaliknya, kita menggunakan huruf. Ertinya, menghitung dalam
Perenambelasan, enam belas "nombor" adalah:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Dengan kata lain, A adalah "sepuluh" dalam "biasa" nombor, B "sebelas", C adalah "dua
belas", D adalah "tiga belas", E "empat belas", dan "F" adalah lima belas. Ini adalah
penggunaan huruf untuk angka yang membuat nombor-nombor Perenambelasan jadi
terlihat aneh pada awalnya. Tetapi penukaran bekerja dengan cara biasa.
Reading off the digits, starting from the top and wrapping around the
List the digits, and count them off from the RIGHT, starting with zero:
1 6
digits:
5
2 1
numbering:
0
Kite kene gune huruf utk jawapan kalau kite xboleh bahagi lagi contoh diatas xleh
lg bahagi dgn 16 ngn 15 tp kalau die bkn 15 die bwah dari 10 contoh 9 ,8 ,7 ,6
,5 ,4 ,3 ,2 ,1 , 0 xboleh gune huruf
From the long division, I can see that the hexadecimal number will have a
"fifteen" in the sixteen-cubeds column, a "nine" in the sixteen-squareds column,
an "eleven" in the sixteens column, and a "thirteen" in the ones column. But I
"eleven", and "D" stand in for "thirteen". Copyright © Elizabeth Stapel 1999-2011 All
Rights Reserved
I will list out the digits, and count them off from the RIGHT, starting at
zero:
F 9
digits:
B D
3 2
numbering:
1 0
digits: 15 9 11 13
numbering: 3 2 1 0