# 为什么十六进制地址是14个字符？(why the hex address is 14 character?)

` 在十六进制地址中：0x7fffd7c24334为什么位数为14？ 每个十六进制地址是14个字符？ 我尝试一些变量，如double和int，但它只有14个字符。 它遵守一些规则吗？ 谢谢你的所有答案。 in the hex address like: 0x7fffd7c24334 why number of digits is 14? is it 14 character for every hex address? I try it for some variable like double and int but it was just 14 character. is it obey some rules? thanks for all answers.原文：https://stackoverflow.com/questions/28854058`

## 最满意答案

` 12个十六进制数字（带前导0x）表示48位。 那是256 TB的虚拟地址空间。 在AMD64上阅读wiki（我假设你在上面，对吗？）架构http://en.wikipedia.org/wiki/X86-64 12 hex digits (with leading 0x) mean 48 bits. That is 256 TB of virtual address space. Read wiki on AMD64 (I assume that you are on it, right?) architecture http://en.wikipedia.org/wiki/X86-64`

## 转换和分离2字节十六进制到两个字符，上面两个十六进制转到一个字符，下面两个十六进制转到C ++中的第二个字符(converting and Separating 2 byte hex to two chararacters, upper two hex goes to one character and lower two hex goes to second charater in C++)

uhex = static_cast<unsigned char>(u_int_variable >> 8); lhex = static_cast<unsigned char>(u_int_variable & 0xFF); 或者，对于> 32位无符号整数绝对安全： uhex = static_cast<unsigned char>((u_int_variable >> 8) & 0xFF); uhex = static_cast<unsigned char>(u_int_variable ...

## 为什么十六进制地址是14个字符？(why the hex address is 14 character?)

12个十六进制数字（带前导0x）表示48位。 那是256 TB的虚拟地址空间。 在AMD64上阅读wiki（我假设你在上面，对吗？）架构http://en.wikipedia.org/wiki/X86-64 12 hex digits (with leading 0x) mean 48 bits. That is 256 TB of virtual address space. Read wiki on AMD64 (I assume that you are on it, right?) arc ...