نظام عد ستة عشري

(تم التحويل من نظام عد سداسي عشر)
أنظمة الأرقام حسب الثقافة
الأرقام الهندية العربية
العربية المغربية
العربية المشرقية
الخمير
العائلة الهندية
البراهمية
التايلندية
أرقام شرق آسيا
الصينية
سوژو
عصي العد
اليابانية
الكورية 
الأرقام الأبجدية
أبجد
الأرمنية
السيريلية
جعيز
العبرية
اليونانية (Ionian)
أريابهاتا
 
أنظمة أخرى
Attic
البابلية
المصرية
الإتروسكية
المايا
الرومانية
Urnfield
قائمة مواضيع نظم الأرقام
Positional systems by base
عشري (10)
2, 4, 8, 16, 32, 64
1, 3, 9, 12, 20, 24, 30, 36, 60, more…

نظام العد السداسي عشر (Hexadecimal) هو نظام عد حيث يمكن أن تأخذ الخانة الواحدة 16 قيمة مختلفة, و ذلك يعني بأن الخانة الموالية تتغير بعد 16 رقم, مقابل 10 بالنسبة للنظام العشري (Decimal), و 2 بالنسبة للنظام الثنائي (Binary), و 8 للنظام الثماني (Octal).

و ال16 قيمة مختلفة التي يمكن أن تتخذها كل خانة تتمثل من 0 إلى 9 و من A إلى B, حيث الحروف اللتينية A..B, هي بالتناسب من 10 إلى 15 عدد الاحتمالات بالنسبة للنظام السداسي عشر يساوي 16 قوة عدد الخانات

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

تمثيله و تحويله

للتفرقة بين نظام العد السداسي عشر و الأنظمة الأخرى يقع استعمال كتابة فاذا اعتبرنا العدد 4B5, فيجب كتابته كما يلي : 4B516

بعض لغات البرمجة مثل السي لها طرقها الخاصة, فمثلا 4B5 يمكن ان يكتب في شكل 0x4B5

للمساعدة في التحويل بين أنظمة العد الثنائية, العشرية و السداسي عشرية : يقع الاستعانة بالجدول التالي :

ن2     ن10     ن16
0000 00 0
0001 01 1
0010 02 2
0011 03 3
0100 04 4
0101 05 5
0110 06 6
0111 07 7
1000 08 8
1001 09 9
1010 10 A
1011 11 B
1100 12 C
1101 13 D
1110 14 E
1111 15 F

و لتحويل رقم يحتوي أكثر من خانة, يقع العمل بالمثال التالي : 4B5A16 = 0100 1011 0101 10102 = (4*16^4)+(11*16^3)+(5*16^3)+(10*16^1)10


Real numbers

Rational numbers

As with other numeral systems, the hexadecimal system can be used to represent rational numbers, although repeating expansions are common since sixteen (10hex) has only a single prime factor (two):

1/2 = 0.8
1/3 = 0.5
1/4 = 0.4
1/5 = 0.3
1/6 = 0.2A
1/7 = 0.249
1/8 = 0.2
1/9 = 0.1C7
1/A = 0.19
1/B = 0.1745D
1/C = 0.15
1/D = 0.13B
1/E = 0.1249
1/F = 0.1
1/10 = 0.1
1/11 = 0.0F

where an overline denotes a recurring pattern.

For any base, 0.1 (or "1/10") is always equivalent to one divided by the representation of that base value in its own number system. Thus, whether dividing one by two for binary or dividing one by sixteen for hexadecimal, both of these fractions are written as 0.1. Because the radix 16 is a perfect square (42), fractions expressed in hexadecimal have an odd period much more often than decimal ones, and there are no cyclic numbers (other than trivial single digits). Recurring digits are exhibited when the denominator in lowest terms has a prime factor not found in the radix; thus, when using hexadecimal notation, all fractions with denominators that are not a power of two result in an infinite string of recurring digits (such as thirds and fifths). This makes hexadecimal (and binary) less convenient than decimal for representing rational numbers since a larger proportion lie outside its range of finite representation.

All rational numbers finitely representable in hexadecimal are also finitely representable in decimal, duodecimal and sexagesimal: that is, any hexadecimal number with a finite number of digits has a finite number of digits when expressed in those other bases. Conversely, only a fraction of those finitely representable in the latter bases are finitely representable in hexadecimal. For example, decimal 0.1 corresponds to the infinite recurring representation 0.199999999999... in hexadecimal. However, hexadecimal is more efficient than bases 12 and 60 for representing fractions with powers of two in the denominator (e.g., decimal one sixteenth is 0.1 in hexadecimal, 0.09 in duodecimal, 0;3,45 in sexagesimal and 0.0625 in decimal).

n Decimal
Prime factors of base, b = 10: 2, 5; b − 1 = 9: 3; b + 1 = 11: 11
Hexadecimal
Prime factors of base, b = 1610 = 10: 2; b − 1 = 1510 = F: 3, 5; b + 1 = 1710 = 11: 11
Fraction Prime factors Positional representation Positional representation Prime factors Fraction(1/n)
2 1/2 2 0.5 0.8 2 1/2
3 1/3 3 0.3333... = 0.3 0.5555... = 0.5 3 1/3
4 1/4 2 0.25 0.4 2 1/4
5 1/5 5 0.2 0.3 5 1/5
6 1/6 2, 3 0.16 0.2A 2, 3 1/6
7 1/7 7 0.142857 0.249 7 1/7
8 1/8 2 0.125 0.2 2 1/8
9 1/9 3 0.1 0.1C7 3 1/9
10 1/10 2, 5 0.1 0.19 2, 5 1/A
11 1/11 11 0.09 0.1745D B 1/B
12 1/12 2, 3 0.083 0.15 2, 3 1/C
13 1/13 13 0.076923 0.13B D 1/D
14 1/14 2, 7 0.0714285 0.1249 2, 7 1/E
15 1/15 3, 5 0.06 0.1 3, 5 1/F
16 1/16 2 0.0625 0.1 2 1/10
17 1/17 17 0.0588235294117647 0.0F 11 1/11
18 1/18 2, 3 0.05 0.0E38 2, 3 1/12
19 1/19 19 0.052631578947368421 0.0D79435E5 13 1/13
20 1/20 2, 5 0.05 0.0C 2, 5 1/14
21 1/21 3, 7 0.047619 0.0C3 3, 7 1/15
22 1/22 2, 11 0.045 0.0BA2E8 2, B 1/16
23 1/23 23 0.0434782608695652173913 0.0B21642C859 17 1/17
24 1/24 2, 3 0.0416 0.0A 2, 3 1/18
25 1/25 5 0.04 0.0A3D7 5 1/19
26 1/26 2, 13 0.0384615 0.09D8 2, D 1/1A
27 1/27 3 0.037 0.097B425ED 3 1/1B
28 1/28 2, 7 0.03571428 0.0924 2, 7 1/1C
29 1/29 29 0.0344827586206896551724137931 0.08D3DCB 1D 1/1D
30 1/30 2, 3, 5 0.03 0.08 2, 3, 5 1/1E
31 1/31 31 0.032258064516129 0.08421 1F 1/1F
32 1/32 2 0.03125 0.08 2 1/20
33 1/33 3, 11 0.03 0.07C1F 3, B 1/21
34 1/34 2, 17 0.02941176470588235 0.078 2, 11 1/22
35 1/35 5, 7 0.0285714 0.075 5, 7 1/23
36 1/36 2, 3 0.027 0.071C 2, 3 1/24


. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Irrational numbers

The table below gives the expansions of some common irrational numbers in decimal and hexadecimal.

Number Positional representation
Decimal Hexadecimal
2 (the length of the diagonal of a unit square) 1.414213562373095048... 1.6A09E667F3BCD...
3 (the length of the diagonal of a unit cube) 1.732050807568877293... 1.BB67AE8584CAA...
5 (the length of the diagonal of a 1×2 rectangle) 2.236067977499789696... 2.3C6EF372FE95...
φ (phi, the golden ratio = (1+قالب:Radical)/2) 1.618033988749894848... 1.9E3779B97F4A...
π (pi, the ratio of circumference to diameter of a circle) 3.141592653589793238462643
383279502884197169399375105...
3.243F6A8885A308D313198A2E0
3707344A4093822299F31D008...
e (the base of the natural logarithm) 2.718281828459045235... 2.B7E151628AED2A6B...
τ (the Thue–Morse constant) 0.412454033640107597... 0.6996 9669 9669 6996...
γ (the limiting difference between the
harmonic series and the natural logarithm)
0.577215664901532860... 0.93C467E37DB0C7A4D1B...

Powers

Powers of two have very simple expansions in hexadecimal. The first sixteen powers of two are shown below.

2x Value Value (Decimal)
20 1 1
21 2 2
22 4 4
23 8 8
24 10hex 16dec
25 20hex 32dec
26 40hex 64dec
27 80hex 128dec
28 100hex 256dec
29 200hex 512dec
2A (210dec ) 400hex 1024dec
2B (211dec ) 800hex 2048dec
2C (212dec ) 1000hex 4096dec
2D (213dec ) 2000hex 8192dec
2E (214dec ) 4000hex 16,384dec
2F (215dec ) 8000hex 32,768dec
210 (216dec ) 10000hex 65,536dec

استعمالاته

See also

References

خطأ استشهاد: علامة <ref> بالاسم " Savard_2018_CA " المحددة في <references> لها سمة المجموعة " " والتي لا تظهر في النص السابق.
خطأ استشهاد: علامة <ref> بالاسم " Bendix " المحددة في <references> لها سمة المجموعة " " والتي لا تظهر في النص السابق.
خطأ استشهاد: علامة <ref> بالاسم " Illiac-I " المحددة في <references> لها سمة المجموعة " " والتي لا تظهر في النص السابق.

خطأ استشهاد: علامة <ref> بالاسم " RP_1957_LGP-30 " المحددة في <references> لها سمة المجموعة " " والتي لا تظهر في النص السابق.