5. Unicode, HTML, and the Upside Down Exclamation
i) So how does Unicode fit in to our discussion of the two HTML numeric character references that can be used to represent the upside code exclamation (
¡)? Well, both of these HTML codes refer to the Unicode code point for the upside down exclamation point - which in conventional base 10 is 161!
ii) There are different ways of expressing 161. It can of course be expressed in base 10 decimal (161). It can also be refered to in hexadecimal or base 16. The hexadecimal representation of 161 is actually very common in the context of Unicode.
iii) When you convert 161 to hexadecimal (base 16) you get a1. Here's how you count in hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f. After you've exhausted those 16 digits, you combine digits to form a larger number. So after the number f, you have 10. But 10 in hexadecimal is actually 16 in decimal (base 10).
iv) The HTML code
¡ is straightforward - this refers to the Unicode code point of 161 in decimal. The # symbol just indicates that a number will follow. The
¡ refers to the same Unicode code point, but in hexadecimal. The #x indicates that the number to follow is in hexadecimal notion. The a1 is the actual hexadecimal number which is equivalent to the base 10 number 161.