☰ خطة العام · تكنولوجيا المعلومات والاتصالات (بالإنجليزية)

Hexadecimal numbers

الأسبوع 4 · الوحدة ١ «النظم العددية» (٤): النظام السداسي عشر، التحويل من السداسي عشر إلى العشري ومن العشري إلى السداسي عشر · 3 دروس
2

Hexadecimal to decimal with place values 1, 16, 256

ICT Secondary 3 Term 1, Unit 1, Topic 1: pp. 18–21
GoalTurn a hexadecimal number into a decimal number.
New words
place value in base 16 · what a place is worth: 1, 16, 256, 4096 … counted from the rightpower of 16 · 16⁰ = 1, 16¹ = 16, 16² = 256, 16³ = 4096conversion · writing the same number in another system
Explanation

The places of a hexadecimal number are worth powers of 16, counted from the right: 16⁰ = 1, 16¹ = 16, 16² = 256 and 16³ = 4096. To convert to decimal, replace each letter by its value, multiply each digit by the value of its place, and add. For (2A5)₁₆ the digits 2, A and 5 stand in the places worth 256, 16 and 1, and A means 10, so (2A5)₁₆ = 2×256 + 10×16 + 5×1 = 512 + 160 + 5 = 677 in decimal. A letter must be replaced by its value before multiplying: the A in 2A5 is worth 10. The biggest number with two hexadecimal symbols is FF, which is 255, the same as the biggest number a byte can show.

Place value256161
Power of 1616²16¹16⁰
Digit of 2A52A = 105
Digit × value5121605
Worked examples
Place value161
DigitE = 147
Digit × value2247
Convert (E7)₁₆. The letter E is worth 14 and stands in the place worth 16; the 7 is in the ones place. So 14×16 + 7 = 224 + 7 = 231.
ƒFormula
FF = 15×16 + 15×1 = 240 + 15 = 255
The biggest number with two hexadecimal symbols is (FF)₁₆. Both F are worth 15, one in the sixteens place and one in the ones place.
Class activity

Choose three hexadecimal numbers of two or three symbols, with a letter in at least two of them. Convert each to decimal on paper with a table of place values.

Practice
1
Convert (4D)₁₆ to decimal.
2
Convert (1F)₁₆ to decimal.
3
Convert (A0)₁₆ to decimal.
4
Convert (100)₁₆ to decimal.
5
Which is bigger, (3F)₁₆ or the decimal number 50?