About hexadecimal:
There are 7 hexadecimal (week), 60 hexadecimal (hour), and 10 hexadecimal (arithmetic) in life.
The computer needs to use 10-, 16-, 2-, and 8.
It is used less in hexadecimal notation, but there are also file attributes on Unix servers, for example.
Binary Systems are easy to recognize by computers. The binary system is easy to recognize by humans. It is said that the binary system originated from ten fingers.
Why do computers use octal and hexadecimal?
Because: 23 = 8; 24 = 16; this is easier to convert to binary.
It can be seen from this that the conversion between binary and 10 is relatively complicated.
The following example illustrates the hexadecimal representation. All seven functions return an integer of 255:
// decimal function fun0: integer; ASM mov eax, 255end; // a d (case-insensitive) function fun1 can be added after the decimal number: integer; ASM mov eax, 255 dend; // The binary value is followed by B (case-insensitive) function fun2: integer; ASM mov eax, 11111111 bend; // Add O (case-insensitive) function fun3: integer to the end of octal sequence; ASM mov eax, 377 oend; // Add $ function fun4: integer to the front of hexadecimal sequence; ASM mov eax, $ ffend; // The hexadecimal format can also be followed by H (case-insensitive) function fun5: integer; ASM mov eax, 0ffh {using this method, the first digit cannot be a letter, otherwise, it will be considered as an identifier} end; // Delphi that does not compile Code only supports representing the hexadecimal function fun6 with $: integer; begin result: = $ ff; end; // Test Procedure tform1.button1click (Sender: tobject); begin showmessage (inttostr (fun0 )); {255} showmessage (inttostr (fun1); {255} showmessage (inttostr (fun2); {255} showmessage (inttostr (fun3 )); {255} showmessage (inttostr (fun4); {255} showmessage (inttostr (fun5); {255} showmessage (inttostr (fun6); {255} end;