HEX, DEC, OCT, and BIN Meanings
Category Programming Techniques
The meanings of HEX, DEC, OCT, and BIN are as follows:
-
HEX
, full English name Hexadecimal, represents the hexadecimal system.
-
DEC
, full English name Decimal, represents the decimal system.
-
OCT
, full English name Octal, represents the octal system.
-
BIN
, full English name Binary, represents the binary system.
Detailed Explanation
Hexadecimal (abbreviated as hex or subscript 16) is a counting system with a base of 16, a system that advances by 1 every 16 counts. It is usually represented by the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and the letters A, B, C, D, E, F (a, b, c, d, e, f), where: A~F represent 10~15, these are called hexadecimal digits.
Decimal numbers are part of a number system based on 10, composed of the ten basic digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The decimal system, known in English as the Decimal System, comes from the Greek word Decem, meaning ten. The decimal counting system was invented by Hindu scholars 1500 years ago and was passed on by Arabs to the 11th century.
Octal, Octal, abbreviated as OCT or O, is a counting method with a base of 8, using the eight digits 0, 1, 2, 3, 4, 5, 6, 7, advancing by 1 every eight counts. In some programming languages, a number starting with the digit 0 often indicates that the number is octal. Octal numbers can correspond bit by bit with binary numbers (one octal digit corresponds to three binary digits), hence their frequent use in computer languages.
Binary is a numbering system widely used in computer technology. Binary data is represented by the digits 0
and 1
. Its base is 2, with the rule of advancing by "one every two" and borrowing by "one equals two". Binary numbers (binaries) are a counting system that advances by 2, with 0 and 1 as the basic symbols; the foundation of computer operations uses the binary system.
Hexadecimal / Decimal / Octal / Binary Conversion Example Table
Online base converter: https://c.tutorialpro.org/front-end/58/
Decimal | Octal | Hexadecimal | Binary |
---|---|---|---|
0 | 000 | 0x00 | 0000 0000 |
1 | 001 | 0x01 | 0000 0001 |
2 | 002 | 0x02 | 0000 0010 |
3 | 003 | 0x03 | 0000 0011 |
4 | 004 | 0x04 | 0000 0100 |
5 | 005 | 0x05 | 0000 0101 |
6 | 006 | 0x06 | 0000 0110 |
7 | 007 | 0x07 | 0000 0111 |
8 | 010 | 0x08 | 0000 1000 |
9 | 011 | 0x09 | 0000 1001 |
... | ... | ... | ... |
10 | 012 | 0x0A | 0000 1010 |
11 | 013 | 0x0B | 0000 1011 |
12 | 014 | 0x0C | 0000 1100 |
13 | 015 | 0x0D | 0000 1101 |
14 | 016 | 0x0E | 0000 1110 |
15 | 017 | 0x0F | 0000 1111 |
16 | 020 | 0x10 | 0001 0000 |
17 | 021 | 0x11 | 0001 0001 |
18 | 022 | 0x12 | 0001 0010 |
19 | |||
97 | /141 | 0x61 | 0 1 1 0 0 0 0 1 |
98 | /142 | 0x62 | 0 1 1 0 0 0 1 0 |
99 | /143 | 0x63 | 0 1 1 0 0 0 1 1 |
100 | /144 | 0x64 | 0 1 1 0 0 1 0 0 |
101 | /145 | 0x65 | 0 1 1 0 0 1 0 1 |
102 | /146 | 0x66 | 0 1 1 0 0 1 1 0 |
103 | /147 | 0x67 | 0 1 1 0 0 1 1 1 |
104 | /150 | 0x68 | 0 1 1 0 1 0 0 0 |
105 | /151 | 0x69 | 0 1 1 0 1 0 0 1 |
106 | /152 | 0x6A | 0 1 1 0 1 0 1 0 |
107 | /153 | 0x6B | 0 1 1 0 1 0 1 1 |
108 | /154 | 0x6C | 0 1 1 0 1 1 0 0 |
109 | /155 | 0x6D | 0 1 1 0 1 1 0 1 |
110 | /156 | 0x6E | 0 1 1 0 1 1 1 0 |
111 | /157 | 0x6F | 0 1 1 0 1 1 1 1 |
112 | /160 | 0x70 | 0 1 1 1 0 0 0 0 |
113 | /161 | 0x71 | 0 1 1 1 0 0 0 1 |
114 | /162 | 0x72 | 0 1 1 1 0 0 1 0 |
115 | /163 | 0x73 | 0 1 1 1 0 0 1 1 |
116 | /164 | 0x74 | 0 1 1 1 0 1 0 0 |
117 | /165 | 0x75 | 0 1 1 1 0 1 0 1 |
118 | /166 | 0x76 | 0 1 1 1 0 1 1 0 |
119 | /167 | 0x77 | 0 1 1 1 0 1 1 1 |
120 | /170 | 0x78 | 0 1 1 1 1 0 0 0 |
121 | /171 | 0x79 | 0 1 1 1 1 0 0 1 |
122 | /172 | 0x7A | 0 1 1 1 1 0 1 0 |
123 | /173 | 0x7B | 0 1 1 1 1 0 1 1 |
124 | /174 | 0x7C | 0 1 1 1 1 1 0 0 |
125 | /175 | 0x7D | 0 1 1 1 1 1 0 1 |
126 | /176 | 0x7E | 0 1 1 1 1 1 1 0 |
127 | /177 | 0x7F | 0 1 1 1 1 1 1 1 |
128 | /200 | 0x80 | 1 0 0 0 0 0 0 0 |
129 | /201 | 0x81 | 1 0 0 0 0 0 0 1 |
| 215 | /327 | 0xD7 | 1 1 0 1 0 1 1 1 | | 216 | /330 | 0xD8 | 1 1 0 1 1 0 0 0 | | 217 | /331 | 0xD9 | 1 1 0 1 1 0 0 1 | | 218 | /332 | 0xDA | 1 1 0 1 1 0 1 0 | | 1 219 | /333 | 0xDB | 1 1 0 1 1 0 1 1 | | | | | | | 220 | /334 | 0xDC | 1 1 0 1 1 1 0 0 | | 221 | /335 | 0xDD | 1 1 0 1 1 1 0 1 | | 222 | /336 | 0xDE | 1 1 0 1 1 1 1 0 | | 223 | /337 | 0xDF | 1 1 0 1 1 1 1 1 | | 224 | /340 | 0xE0 | 1 1 1 0 0 0 0 0 | | 225 | /341 | 0xE1 | 1 1 1 0 0 0 0 1 | | 226 | /342 | 0xE2 | 1 1 1 0 0 0 1 0 | | 227 | /343 | 0xE3 | 1 1 1 0 0 0 1 1 | | 228 | /344 | 0xE4 | 1 1 1 0 0 1 0 0 | | 229 | /345 | 0xE5 | 1 1 1 0 0 1 0 1 | | | | | | | 230 | /346 | 0xE6 | 1 1 1 0 0 1 1 0 | | 231 | /347 | 0xE7 | 1 1 1 0 0 1 1 1 | | 232 | /350 | 0xE8 | 1 1 1 0 1 0 0 0 | | 233 | /351 | 0xE9 | 1 1 1 0 1 0 0 1 | | 234 | /352 | 0xEA | 1 1 1 0 1 0 1 0 | | 235 | /353 | 0xEB | 1 1 1 0 1 0 1 1 | | 236 | /354 | 0xEC | 1 1 1 0 1 1 0 0 | | 237 | /355 | 0xED | 1 1 1 0 1 1 0 1 | | 238 | /356 | 0xEE | 1 1 1 0 1 1 1 0 | | 239 | /357 | 0xEF | 1 1 1 0 1 1 1 1 | | | | | | | 240 | /360 | 0xF0 | 1 1 1 1 0 0 0 0 | | 241 | /361 | 0xF1 | 1 1 1 1 0 0 0 1 | | 242 | /362 | 0xF2 | 1 1 1 1 0 0 1 0 | | 243 | /363 | 0xF3 | 1 1 1 1 0 0 1 1 | | 244 | /364 | 0xF4 | 1 1 1 1 0 1 0 0 | | 245 | /365 | 0xF5 | 1 1 1 1 0 1 0 1 | | 246 | /366 | 0xF6 | 1 1 1 1 0 1 1 0 | | 247 | /367 | 0xF7 | 1 1 1 1 0 1 1 1 | | 248 | /370 | 0xF8 | 1 1 1 1 1 0 0 0 | | 249 | /371 | 0xF9 | 1 1 1 1