Why Are Hexadecimal Numbers Prefixed With 0x? - Wyzant

Có thể bạn quan tâm

Subject ZIP Search Search Find an Online Tutor Now Ask Ask a Question For Free Login C Why are hexadecimal numbers prefixed with 0x? Why are hexadecimal numbers prefixed as `0x`? I understand the usage of the prefix but I don't understand the significance of why `0x` was chosen. Follow 1 Add comment More Report

1 Expert Answer

Best Newest Oldest By: Best Newest Oldest

That is actually a convention stemming largely from C. With the C family being very popular languages (compared to TI-BASIC and LISP), this is one of the more common representations. So the best person to answer the question as to 'why' is Dennis Ritchie. But as far as conventions go it's certainly not universal: other languages use different conventions, LISP for example uses #x and #16r, to my recollection, and the TI calculator I had represented hex with 0h (makes more sense in my mind than 0x,but ah well), and my first language (some flavor of BASIC) used &h. Even the use of ABCDEF to represent 10-15 wasn't universal (some old systems used other letters including X and H for hexidecimal), and that might have influenced the decision for which letter to use depending on what hardware the language designers were familiar with. But that's just wild speculation.

Upvote 0 Downvote Add comment More Report

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem. Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.

¢ € £ ¥ ‰ µ · • § ¶ ß ‹ › « » < > ≤ ≥ – — ¯ ‾ ¤ ¦ ¨ ¡ ¿ ˆ ˜ ° − ± ÷ ⁄ × ƒ ∫ ∑ ∞ √ ∼ ≅ ≈ ≠ ≡ ∈ ∉ ∋ ∏ ∧ ∨ ¬ ∩ ∪ ∂ ∀ ∃ ∅ ∇ ∗ ∝ ∠ ´ ¸ ª º † ‡ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Œ Š Ù Ú Û Ü Ý Ÿ Þ à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø œ š ù ú û ü ý þ ÿ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω ℵ ϖ ℜ ϒ ℘ ℑ ← ↑ → ↓ ↔ ↵ ⇐ ⇑ ⇒ ⇓ ⇔ ∴ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌈ ⌉ ⌊ ⌋ 〈 〉 ◊

RELATED TOPICS

Java C++ Computer Programming Computer Science Linux Logic Unix Programming Algorithm Data Structures ... Assembly Api User Interface Gcc C Preprocessor Macros Linux Kernel Floating Point Segmentation Fault Stack

RELATED QUESTIONS

Computer Architect questions: C TO MIPS

Answers · 1

can you tell me the wrong

Answers · 1

Create a structure called car with the following members: make, model, year, and miles.

Answers · 2

Find the average or mean slope of the function on this interval

Answers · 2

for what value of the constant c is the function f continious

Answers · 1

RECOMMENDED TUTORS

Geoff T.

5.0 (180)

Nina M.

4.7 (2,668)

Jonathan K.

5 (9) See more tutors

find an online tutor

  • R tutors
  • MPRE tutors
  • DAT tutors
  • SAT tutors
  • NREMT tutors
  • ISEE tutors
  • Biostatistics tutors
  • Math tutors

Từ khóa » &h 0x