50 likes | 281 Views
Hexadecimal system. Computer Programming 1 Honors. Used to represent groups of four binary digits Base 16 system – based on 0 through 9, and letters A through F ( A-F representing 10-15) Each place represents a power of 16 Example of converting hexadecimal to decimal:
E N D
Hexadecimal system Computer Programming 1 Honors
Used to represent groups of four binary digits • Base 16 system – based on 0 through 9, and letters A through F ( A-F representing 10-15) • Each place represents a power of 16 • Example of converting hexadecimal to decimal: • 1F represents the sum 1 x 161 + 15 x 160 • 1x16 + 15+1 • 16+15=31
In mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a to f) to represent values ten to fifteen. • Example: the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160) , or 10,995. • Each hexadecimal digit represents four binary digits (bits) (also called a "nibble"), and the primary use of hexadecimal notation is as a human-friendly representation of binary coded values in computing and digital electronics. For example, byte values can range from 0 to 255 (decimal) but may be more conveniently represented as two hexadecimal digits in the range 00 through FF. Hexadecimal is also commonly used to represent computer memory addresses.
Hexadecimal To Binary Conversion: • Just suppose we want to convert 3F into its binary equivalent here is how to achieve it. First of all convert 3 and F to its 4 bit equivalent binary. • 3 F • 0011 1111 • So binary equivalent of 3F is 0011 1111 • Another Example: • How to convert 3AF into its binary equivalent: 3AF is a hexadecimal number so first of all we will convert 3, A and F into its binary equivalent separately and then join them together, that will be binary equivalent of 3AF. • 3 A F • 0011 1010 1111 • So binary equivalent of 3AF is 0011 1010 1111. • Binary To Hexadecimal Conversion: • Here is how you can convert binary number to its hexadecimal equivalent. Just suppose we want to convert this 16 bit binary into hexadecimal. Here is the 16 bit binary number. 1111 1110 0011 1111. So first of all we will convert each 4 bits into its hexadecimal equivalent and then join them to get the answer. • 1111 1110 0011 1111 • F E 3 F • So FE3F is a hexadecimal number of given binary equivalent