What is hexadecimal: Definition and 22 Discussions

In mathematics and computing, the hexadecimal (also base-16 or simply hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system representing numbers using 10 symbols, hexadecimal uses 16 distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9, and "A"–"F" (or alternatively "a"–"f") to represent values from 10 to 15.
Software developers and system designers widely use hexadecimal numbers because they provide a human-friendly representation of binary-coded values. Each hexadecimal digit represents four bits (binary digits), also known as a nibble (or nybble). For example, an 8-bit byte can have values ranging from 00000000 to 11111111 in binary form, which can be conveniently represented as 00 to FF in hexadecimal.
In mathematics, a subscript is typically used to specify the base. For example, the decimal value 36,731 would be expressed in hexadecimal as 8F7B16. In programming, a number of notations are used to denote hexadecimal numbers, usually involving a prefix. The prefix 0x is used in C, which would denote this value as 0x8F7B.
Hexadecimal is used in the transfer encoding Base16, in which each byte of the plaintext is broken into two 4-bit values and represented by two hexadecimal digits.

View More On Wikipedia.org
  1. S

    2’s Complement Hexadecimal Addition

    The solution (green arrow) states that for example : 0xD + 0x9 = 0x16 Details : 0xD = 13, 0x9 = 9, 13 + 9 = 22, 22 = 0x16 Where does the 0x16 come from? I do get to add D + 9 = 13 + 19 = 22 so how come 22 is equal to 16 (assuming D + 9 = 16 is correct) How am I suppose this solution?
  2. Amathproblem22

    MHB Question: Binary & Hexadecimal

    I don't need help with a problem just help with easy ways of tackling the problems. Below are my current methods. (Hopefully, all is correct I was in a rush). Binary to Decimal: 128 64 32 16 8 4 2 1 1 1 1 1 0 0 0 1 I already know 128+64+32= 224 so then 16+1=17, meaning 224+17=241...
  3. Eclair_de_XII

    Python Hexadecimal errors when hitting back-space while using inquirer module

    I'm using this user-defined module for an amateur coding project, and I am using 'Text' from the 'inquirer' module. When I am either inputting things, or whenever I am validating things, I always get some sort of error. These errors mainly result whenever I hit the back-space key on my...
  4. hapypy_09

    How to write a program to transfer any number to hexadecimal?

    Summary:: I have a homework " Write a program to input a number from the keyboard, printing the above screen on base 16 (hexadecimal) system". But I don't know how it works. I find it on the Internet but it only have convert from base system 10 to base system 16. And it is written in assembly...
  5. M

    I Exploring the Golden Ratio in Hexadecimal: How to Calculate the First 50 Digits

    I am not sure if this is the right section for this, but i didn't find it anywhere and I really need it. Can someone point me towards a place/tell me a program where I can get/compute the first (at least) 50 digits in the hexadecimal representation of the golden ratio? Thank you!
  6. F

    Hexadecimal Multiplication using 2's complement

    Homework Statement Perform the following operations using 2's complement method. ##FFFD_{16} * FFF1_{16}## Homework Equations - The Attempt at a Solution ##FFFD_{16}## ----> (1's comp.) = ##0002_{16}## -----> (2's comp.) = ##0003_{16}## ##FFF1_{16}## ----> (1's comp.) = ##000E_{16}## ----->...
  7. M

    Hexadecimal number multiplication

    I am trying to multiply hexadecimal numbers. Here is what my book has given Here is my solution book solution and my solution has differed in the red marked area. which solution is correct? am I doing anything wrong here? I get 6 F but book wrote 78 in that red marked area. Need...
  8. S

    Hexadecimal and factorial problem

    Homework Statement Hello all, I am trying to determine the last hexadecimal digit of a sum of rather large factorials. To start, I have the sum 990! + 991! +...+1000!. I am trying to find the last hex digit of a larger sum than this, but I think all I need is a push in the right direction...
  9. znaya

    Convert hexadecimal to decimal

    Homework Statement Convert 0xC4630000 to decimal. Homework Equations The Attempt at a Solution First attempt: 0xC4630000 12(167) = 12(268435456) = 3221225472 4(166) = 4(16777216) = 67108864 6(165) = 6(1048576) = 6291456 3(164) = 3(65536) = 196608 0(163) = 0(4096) = 0 0(162) = 0(256) =...
  10. P

    ASCII Code for B7.CFWhat is the ASCII code for the hexadecimal number B7.CF?

    Homework Statement Give the ASCII code for the hexadecimal number B7.CF (including the code for the hexadecimal point) The Attempt at a Solution This was one of the questions given on a problem sheet in my computer science class. I missed the exact lecture when this was taught so I...
  11. C

    Adding Signed Hexadecimal numbers

    [Mentor's note: This post does not use the template because it was originally posted in a non-homework forum. I moved it here instead of deleting it and asking the poster to re-post, because he has already shown a reasonable amount of effort.] I am having a bit of trouble with this homework...
  12. S

    Converting 2000.90210 to IEEE 754 Hexadecimal

    Homework Statement Convert the decimal number 2000.90210 to a single-precision IEEE 754 hexadecimal. Homework Equations (exponent field)_10 - 127_10 = exponent_10 The first bit is the sign bit. The 2nd to 9th bits are the exponent bits. The 10th to 32nd bits are the fraction field bits...
  13. N

    Binary and hexadecimal expansion

    Homework Statement Show that the binary expansion of a positive integer can be obtained form its hexadecimal expansion by translating each hexadecimal digit into a block of four binary digits. Homework Equations The Attempt at a Solution I know that this is true but I have no...
  14. T

    Decimal Values of 8-bit Hexadecimal Number 0xD1 | Conversion Homework Solution

    Homework Statement Write all the possible decimal values (3 of them) of the 8-bit hexadecimal number 0xD1. The Attempt at a Solution So I can write that D1 = D*161 + 1 * 160 = 13*16 + 1 = 209 Can I also say that the most significant bit is reserved for sign? In that case, I think the...
  15. D

    Hexadecimal number on seven-segment

    I need to design a bank of four 4-bit registers whose contents are displayed on the seven-segment displays. So, basically just display 4 hexadecimal numbers on the 7-segment. The output switches on its own with every clock cycle. I'm using a Basys2 board for this. This is what I have so far...
  16. R

    Convert Hexadecimal to Binary Bits

    How do you convert hexadecimal numbers into bianry bits?
  17. N

    Simple hexadecimal addition question

    Homework Statement I have to hex numbers, x1100 and x3301, that I want to add. I tried to convert them to binary and and them, then convert back to hex-wrong. Tried a straight 1100+3301 addition with the answer being hex, and even used my ti-89 to add them, it can do conversions so why not...
  18. P

    What Is the Probability of Choosing a Hexadecimal Number with Distinct Digits?

    1. Homework Statement 1.(a) How many 4 digit hexadecimal numbers can be formed using the hexadecimal digits 1. 5, 6, 9, A, C?(Repetition is allowed) (b) How many four digit hexadecimal numbers with distinct digits can be formed using the hexadecimal digits above? (c) What is the...
  19. I

    Executing Programs on Microcontrollers & Hexadecimal

    Hi i'm doing a circuits lab in physics at the moment based on programming a PIC16F819 microcontroller. What i don't understand is how the program is executed. I kind of understand that when a pin is logic high voltage then the bit of the number is one and when it is logic low it is zero...
  20. W

    Converting Hexadecimal (base 16) to Octal (base 8)

    Homework Statement Convert the hexadecimal (base 16) value FACE.BE into octal (base 8), correct to 2 octal places. Homework Equations Nil The Attempt at a Solution First, I've converted the FACE.BE to decimals and I got 64206.742188 Next I change them to octal 64206(dec) =...
  21. M

    Negative Number into Hexadecimal

    how would you convert a negative number into a hexadecimal format?
  22. C

    Exploring Binary and Hexadecimal Numbers: Examples and Explanation

    Hello all I need help understanding binary and hexadecimal numbers. What exactly are they? Could you give me some examples? Thanks