User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
glossary:glossary_h [2019/02/06 22:48]
Bob Vetterlein [Hysteresis loop]
glossary:glossary_h [2019/09/05 19:14]
tgerbic added text for Hexadecimal or Hex entry
Line 40: Line 40:
 This is a track detector ([[glossary:​glossary_t#​toti|ToTi]]) using an optical system to detect the location of a train. ​ This is a track detector ([[glossary:​glossary_t#​toti|ToTi]]) using an optical system to detect the location of a train. ​
 Merg kit (for members only) Merg kit (for members only)
 +===== Hexadecimal or Hex =====
 +Computer data is a collection of binary bits, ones and zeros. Programmers generally collect bits into convenient sets of four bits (a nibble) or eight bits (a byte). ​
 +When it comes to writing and speaking the values of bits, rather than saying the value is 10010011, it is simpler to break the bits into small chunks and use a different number system. In the past collecting sets of three bits was common (Octal or base 8) but today sets of four bits are generally used (Hexadecimal or base 16). 
 +Binary uses two characters to count before moving/​carrying to the next column (0 or 1). Decimal uses ten characters (0 to 9). Hexadecimal uses 16 characters (0123456789ABCDEF). For example, binary 1110 has ones in the eights, fours and twos columns. So binary 1110 equals 14 in decimal, which is the letter E in Hexadecimal. ​
 +You can say the address of a byte of data in memory is at location 0101010010101001 in binary or at 21,673 in decimal. Alternately the binary number is broken into sets of four bits (0101 0100 1010 1001) and each set is converted to a hex number (5 4 A 9). So it can be said that the byte of data is at memory location 54A9. The four digit 54A9 is easier to remember, shorter to say and less error prone to write. ​
 +When a hex number is used in a program or written text, it is usually proceeded by some characters to identify which number system you are using. ​ Consider the number 100. In decimal this is one hundred. In binary this is four. In hex it is two hundred fifty six (0001 0000 0000). If you mean 256 then some programmers and programs would put a letter combination such as '​0x',​ '​0h'​ or # before the number (0x100) or a letter such as H or h after (100h). In the MERG forum you will generally see hexadecimal 100 shown as 0x100. ​
glossary/glossary_h.txt ยท Last modified: 2019/11/12 01:47 by Bob Vetterlein