Jumat, 28 Januari 2011

KONVERSI heksadesimal ke DECIMAL

Steps: Langkah-langkah:
  1. Get the last digit of the hex number, call this digit the currentDigit . Dapatkan digit terakhir dari nomor hex, hubungi digit yang currentDigit ini.
  2. Make a variable, let's call it power . Membuat variabel, sebut saja kekuasaan. Set the value to 0. Set nilai ke 0.
  3. Multiply the current digit with (16^ power ), store the result. Kalikan digit dengan (16 ^) kekuasaan, toko saat ini hasilnya.
  4. Increment power by 1. Selisih daya dengan 1.
  5. Set the the currentDigit to the previous digit of the hex number . Mengatur yang currentDigit ke angka sebelumnya nomor hex.
  6. Repeat from step 3 until all digits have been multiplied. Ulangi dari langkah 3 sampai semua digit telah dikalikan.
  7. Sum the result of step 3 to get the answer number. Jumlah hasil dari langkah 3 untuk mendapatkan nomor jawaban.
Example 1 Contoh 1
Convert the number 1 1 2 8 HEXADECIMAL to DECIMAL Mengkonversi angka 1 1 2 8 heksadesimal untuk DECIMAL
MULTIPLICATION Perkalian RESULT HASIL NOTES CATATAN
8 x (16^0) 8 x (16 ^ 0) 8 8 Start from the last digit of the number. Mulai dari angka terakhir dari nomor tersebut. In this case, the number is 112 8 . Dalam hal ini, jumlahnya 112 8. The last digit of that number is 8 . Digit terakhir dari nomor yang 8. Note that the power of 0 of any number is always 1 Perhatikan bahwa kekuatan 0 nomor apapun selalu 1
2 x (16^1) 2 x (16 ^ 1) 32 32 Process the previous, which is 2 . Proses sebelumnya, yaitu 2. Multiply that number with an increasing power of 16. Kalikan jumlah tersebut dengan peningkatan kekuatan 16.
1 x (16^2) 1 x (16 ^ 2) 256 256 Process the previous digit, which is 1 , note that 16^2 means 16 x 16 Proses digit sebelumnya, yang adalah 1, diketahui bahwa 16 ^ 2 berarti 16 x 16
1 x (16^3) 1 x (16 ^ 3) 4096 4096 Process the previous digit, which is 1 , note that 16^3 means 16 x 16 x 16 Proses digit sebelumnya, yang adalah 1, diketahui bahwa 16 ^ 3 berarti 16 x 16 x 16


Here, we stop because there's no more digit to process Di sini, kita berhenti karena tidak ada lagi digit untuk proses
ANSWER JAWABAN 4392 4392 This number comes from the sum of the RESULTS Jumlah ini berasal dari jumlah HASIL
(8+32+256+4096)=4392 (8 +32 +256 +4096) = 4392
Once discerned, notice that the above process is essentially performing this calculation: Setelah dilihat, perhatikan bahwa proses di atas pada dasarnya melakukan perhitungan ini:
1 x(16^3) + 1 x(16^2) + 2 x(16^1) + 8 x(16^0) 1 x (16 ^ 3) + 1 x (16 ^ 2) + 2 x (16 ^ 1) + 8 x (16 ^ 0)
When doing this by hand, it is easier to start backward is because: Ketika melakukan hal ini dengan tangan, lebih mudah untuk memulai mundur adalah karena:
  • Counting the number of digits takes extra time, and you might count wrongly. Menghitung jumlah digit membutuhkan waktu ekstra, dan Anda mungkin menghitung salah.
  • If you don't remember what a particular value of a power-of-16 is, it's easier to calculate it from the previous power value. Jika Anda tidak ingat apa nilai tertentu dari suatu-kuasa-16 ini, lebih mudah untuk menghitung dari nilai kekuatan sebelumnya. For instance, if you don't remember what the value of 16^3 is, then just multiply the value of 16^2 (which you'll likely already have if you started backward) with 16. Sebagai contoh, jika anda tidak ingat apa nilai 16 ^ 3, maka hanya kalikan nilai 16 ^ 2 (yang akan Anda mungkin sudah miliki jika Anda mulai mundur) dengan 16.
Example 2 Contoh 2
Convert the number 589 HEXADECIMAL to DECIMAL Mengkonversi nomor 589 HEXADECIMA L untuk DECIMAL
MULTIPLICATION Perkalian RESULT HASIL
9 x (16^0) 9 x (16 ^ 0) 9 9
8 x (16^1) 8 x (16 ^ 1) 128 128
5 x (16^2) 5 x (16 ^ 2) 1280 1280


ANSWER JAWABAN 1417 1417
If you want to be a speed counter, it's beneficial to memorize the values of the smaller power of 16s, such as in this table Jika Anda ingin menjadi kecepatan counter, itu bermanfaat untuk menghafal nilai-nilai kekuatan yang lebih kecil dari 16, seperti dalam tabel ini
POWER OF 16s POWER OF 16 RESULT HASIL
16^0 16 ^ 0 1 1
16^1 = 16 16 ^ 1 = 16 16 16
16^2 = 16x16 16 ^ 2 = 16x16 256 256
16^3 = 16x16x16 16 ^ 3 = 16x16x16 4096 4096
16^4 = 16x16x16x16 16 ^ 4 = 16x16x16x16 65536 65536
Example 3 Contoh 3
Convert the number 1531 HEXADECIMAL to DECIMAL Mengkonversi angka heksadesimal untuk DECIMAL 1531
(This time, let's use the table of the power-of-16s above.) (Kali ini, mari kita gunakan meja-kekuatan-16 di atas.)
MULTIPLICATION Perkalian RESULT HASIL
1 x 1 1 x 1 1 1
3 x 16 3 16 x 48 48
5 x 256 5 x 256 1280 1280
1 x 4096 1 x 4096 4096 4096


ANSWER JAWABAN 5425 5425

Example 4 Contoh 4
Convert the number FA8 HEXADECIMAL to HEXADECIMAL Mengkonversi angka heksadesimal FA8 untuk heksadesimal
MULTIPLICATION Perkalian RESULT HASIL
8 x 1 8 x 1 8 8
A x 16 (remember that hex A=decimal 10) A x 16 (ingat bahwa A hex = desimal 10) 160 160
F x 256 (remember that hex F=decimal 15) F x 256 (ingat bahwa F hex = 15 desimal) 3840 3840


ANSWER JAWABAN 4008 4008

Tidak ada komentar:

Posting Komentar