Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Hexadecimal Number System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Hexadecimal Number System

Hexadecimal Number System


In mathematics and computer science, hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 09 to represent values zero to nine, and A, B,C,D,E, F (or alternatively af) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 163) + (10 162) + (15 161) + (3160), or 10995. Each hexadecimal digit represents four binary digits (bits), and the primary use of hexadecimal notation is a human-friendly representation of binary-coded values in computing and digital electronics. One hexadecimal digit represents a nibble, which is half of an octet (8 bits). 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 to FF. Hexadecimal is also commonly used to represent computer memory addresses. Binary conversion ;- Most computers manipulate binary data, but it is difficult for humans to work with the large number of digits for even a relatively small binary number. Although most humans are familiar with the base 10 system, it is much easier to map binary to hexadecimal than to decimal because each hexadecimal digit maps to a whole number of bits (410). This example converts 11112 to base ten. Since each position in a binary numeral can contain either a 1 or a 0, its value may be easily determined by its position from the right: Know More About :- Rational Number on a Number Line

Math.Edurite.com

Page : 1/3

00012 = 110 00102 = 210 01002 = 410 10002 = 810 Therefore: 11112 = 810 + 410 + 210 + 110 = 1510 With little practice, mapping 11112 to F16 in one step becomes easy: see table in Written representation. The advantage of using hexadecimal rather than decimal increases rapidly with the size of the number. When the number becomes large, conversion to decimal is very tedious. However, when mapping to hexadecimal, it is trivial to regard the binary string as 4-digit groups and map each to a single hexadecimal digit. Division-remainder in source base ;- As with all bases there is a simple algorithm for converting a representation of a number to hexadecimal by doing integer division and remainder operations in the source base. In theory, this is possible from any base, but for most humans only decimal and for most computers only binary (which can be converted by far more efficient methods) can be easily handled with this method. Let d be the number to represent in hexadecimal, and the series hihi1...h2h1 be the hexadecimal digits representing the number. i := 1 hi := d mod 16 d := (dhi) / 16 If d = 0 (return series hi) else increment i and go to step 2 "16" may be replaced with any other base that may be desired. Addition and multiplication ;- It is also possible to make the conversion by assigning each place in the source base the hexadecimal representation of its place value and then performing multiplication and addition to get the final representation. That is, to convert the number B3AD to decimal one can split the conversion into D (1310), A (1010), 3 (310) and B (1110) then get the final result by multiplying each decimal representation by 16p, where 'p' is the corresponding position from right to left, beginning with 0. In this case we have (13 160) + (10 161) + (3 162) + (11 163), which is 45997 base 10. Read More About :- Rational Numbers in Expressions

Math.Edurite.com

Page : 2/3

ThankYou

Math.Edurite.Com

You might also like