Hexadecimal
Table of Contents
Hexadecimal
Overview
- Hexadecimal is a base-16 number system.
- It uses 16 symbols: 0-9 and A-F (where A represents 10, B represents 11, and so on up to F for 15).
- Hexadecimal is commonly used in computer science for representing memory addresses, data values, and machine code due to its compact representation of binary data.
Key Concepts
- Digits: Each position in a hexadecimal number represents a power of
- The rightmost position represents 160 (1), the next position represents 161 (16), and so on.
Applications
- Computer Programming: Widely used in programming languages, especially for low-level Programming and hardware interaction.
- Data Representation: Often used to represent binary data in a more human-readable format.
- Color Codes: Hexadecimal codes are used to represent colors in web design and other applications (e.g.,
#FFFFFFfor white).
Converting to and from ecimal
Hexadecimal to ecimal
- Assign place values: Assign each hexadecimal digit its corresponding power of 16, starting from the rightmost digit as 160.
- Multiply and sum: Multiply each hexadecimal digit by its place value.
- Add the results: Sum the products to obtain the decimal equivalent.
Decimal to Hexadecimal
- Repeated division: Repeatedly divide the decimal number by 16.
- Record remainders: Record the remainder after each division.
- Reverse order: The hexadecimal number is formed by reading the remainders from bottom to top.