读取英语的十六进制值
多年来,我一直在逐位读取十六进制,现在厌倦了将需要超过 16 位的数字的十六进制值翻译成英语。是否存在将十六进制翻译为英语的更优雅的形式?
在英语中,存在一个用于将十进制值转换为英语的简单系统。十进制 10 是英文“十”,十进制 57 是英文“五十七”,十进制 32767 是“三万二千七百六十七”等等。
据我所知,目前还没有系统可以优雅地表示十六进制英语。十六进制10是英文“一零”或“一哦”,十六进制F0ED是“eff oh eee dee”,十六进制30F538B9310是英文“三哦eff五三八蜜蜂九三一哦”。需要更多位的值的转换变得越来越困难。有时将其转换为十进制等值以获得优雅的英文翻译,因此十六进制的 10 变为“十六”。
感谢您的任何帮助。
I've been reading hexadecimal on a digit by digit basis for many years and am now fed up with translating hex values for numbers requiring more than 16 bits into English. Does a more elegant form of translating hexadecimal to English exist?
In English, a simple system exists for converting decimal values to English. Decimal 10 is English "ten", decimal 57 is english "fifty-seven", decimal 32767 is "thirty-two thousand seven hundred sixty-seven", etc.
As far as I know, there exists no system for elegantly representing hexadecimal in English. Hexadecimal 10 is English "one zero" or "one oh", hexadecimal F0ED is "eff oh eee dee", hexadecimal 30F538B9310 is English "three oh eff five three eight bee nine three one oh". Values requiring more bits become increasingly painful to translate. Sometimes converting it to the decimal equivalent to get an elegant English translation, so hexadecimal 10 becomes "sixteen".
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这是在 Knuth 中 - 谷歌搜索短语“vybong bysanton”(自从读到它以来,它就一直在我的脑海里)会产生 此斜杠评论 和响应:
(回复:)
This is in Knuth - googling the phrase "vybong bysanton" (which has stuck in my mind ever since reading it) produces this slashdot comment and response:
(response:)
我和我的同事经常使用十进制分组来描述值,因此 0x10000 是“十六进制万”或 0xF0000 是“十六进制有效零千”。虽然这绝不是有效的,但它通常对我们有用。我更愿意以 4 位数字而不是 3 位数字进行分组,但缺乏寻找或创建名称的愿望。 ;-)
除了读出每个数字之外,我从未找到任何命名约定。
My coworkers and I frequently use the decimal groupings to describe values, so 0x10000 is "hex ten thousand" or 0xF0000 as "hex eff-zero thousand". While this is by no means efficient, it usually works for us. I would prefer to group at 4 digits instead 3, but lack the desire to look for or create a name. ;-)
I've never found any naming convention aside from reading off each digit.
您是否在寻找阅读这些数字时自己做的事情,或者寻找计算机的算法?
如果是为了你自己,那么我认为没有一个简单的方法——只是练习。例如。识别A0是160,所以A3一定是163,等等。
如果你正在寻找计算机的算法,那么先转换为十进制,然后再转换为文本。所以A3->第163话“一百”+“六十”+“三”。
Are you looking for something for you to do yourself when reading such numbers, or for an algorithm for a computer?
If it is something for yourself, then I don't think there is an easy way - just practice. Eg. recognizing A0 is 160, so A3 must be 163, etc.
If you are looking for an algorithm for a computer, then convert to decimal first, and then convert to text. so A3 -> 163 -> "one hundred" + "and sixty" + "three".
mmm..)先将其转换为小数,然后将结果转换为英文?嗯? :D 或者我错过了什么? )
mmm.. ) convert it to decimals first, then convert result to english? mmm? :D or I missed something? )
我不想从数学角度发明不同的术语(大多数听众不会熟悉),而是更喜欢在十六进制字符串的开头或结尾简单地说“hex”。
对于小于 100hex(即 256dec)的数字,如果十六进制数字仅由数字 0-9 组成,我通常会说数字的十进制约定。因此“46-hex”将是 70dec。当十六进制数字至少包含一位 AF 时,我通常只读取这些十六进制数字和十进制数字。因此“40-cee-hex”将是 76dec。
对于更大的数字,我只使用最清晰的。因此,100hex 可以是“一百十六进制”或“一零零十六进制”,具体取决于个人喜好。
另外,这个答案中的“hex”和“dec”应该写成下标,我不知道在这个答案中该怎么做!
简短的答案是说出听者最清楚的十六进制数字。附加“十六进制”可以消除通信中的任何歧义。希望这有帮助。
Rather than invent different lingo (which most listeners will not be familiar with) from a mathematical perspective, I prefer simply saying "hex" at the beginning or at the end of the hexadecimal string.
For numbers less than 100hex (i.e., 256dec), I typically say the decimal convention for the numbers if the hex number is only composed of digits 0-9. Thus "forty-six-hex" would be 70dec. When the hex number comprises at least one digit of A-F, I normally just read those hex digits and the decimal digits. Thus "forty-cee-hex" would be 76dec.
For larger numbers, I just use what ever is clearest. Thus 100hex would be either "one hundred hex" or "one zero zero hex" depending on personal preference.
Also "hex" and "dec" in this answer should be written as subscripts, which I'm not sure how to do in this answer!
The short answer is to say the hex digits in whatever is clearest to the listener. Appending "hex" removes any ambiguity in the communication. Hope this helps.
“是否存在将十六进制翻译为英语的更优雅的形式?”
我认为我为了好玩而开发的系统要优雅得多,尽管对于与除了我之外的任何人进行交流来说不太实用。 :)
http://www.castedo.com/binspeak/
口语结构是按照方式建模的我们用英语讲以 10 为基数的数字,但是我让它与语言无关,因此它不会重复使用现有的英语单词,因此它并不是真正的英语。
该网页可让您尝试不同的声音系统(请参阅“重新符号化”部分),因此您可以通过选择声音“e”和“t”来替换我默认选择的声音“u”和“8”,从而使 8 听起来大致像英语单词“eight” “s”。
"Does a more elegant form of translating hexadecimal to English exist?"
A system I developed for fun I think is much more elegant, albeit not very practical for communicating with anybody except perhaps me. :)
http://www.castedo.com/binspeak/
The spoken structure is modelled after the way we speak base 10 numbers in English, however I made it language agnostic so it does not re-use existing English words, so it is not really in English.
The webpage lets you try out different sound systems (see the Resymbolize section) so you can make 8 roughly sound like the English word "eight" by choosing sounds "e" and "t" to replace my default choice of sounds "u" and "s".