ASCII Table: Difference between revisions

From Leo's Notes
This page was last edited on 18 January 2023, at 23:16.
m Leo moved page ASCII to ASCII Table: better naming
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
ASCII (American Standard Code for Information Interchange) is a character encoding using 7 bits per character.  Its history comes from the development of connecting computers (terminals) to teleprinters which required some standardized way to send and receive data as well as a way to control data flow. As a result, ASCII contains a bunch of control characters in the lower set.
Terminals convert keys from your keyboard into ASCII. The 5 lower bits of the character set mapped to a key on the keyboard.  The 6th and 7th bit are set to 1 by default and are cleared the shift key and control key, respectively. 
Your terminal will automatically convert specific key combinations into the appropriate character (eg. pressing Shift-1 or '!' sends the appropriate ASCII character). The terminal can also send the appropriate control character with the control modifier key. For example, pressing Ctrl-i, <code>^I</code>, sends a horizontal tabulation (HT) or tab control character.
== ASCII Table ==
== ASCII Table ==
Here is an ASCII table shamelessly copied from Wikipedia.


{| class="wikitable fixed" style="text-align: center;"
{|
|-
|'''Key modifiers:''' Control
! rowspan="2"|[[Binary numeral system|Binary]] !! rowspan="2"|[[Octal|Oct]] !! rowspan="2"|[[Decimal|Dec]] !! rowspan="2"|[[Hexadecimal|Hex]] !! colspan="3" | Glyph
|'''Key modifiers:''' ?
|'''Key modifiers:''' Shift
|'''Key modifiers:''' None
|-
|-
! ’63 !! ’65 !! ’67
|
{| class="wikitable"
!Dec
!Hex
!Binary
!Char
|-
|-
|000 0000 || style="background:lightblue;" | 000 || style="background:#cff;" | 0 || style="background:lightblue;" | 00 || colspan=3 |NUL null
|0
|0x00
|00 00000
|NUL
|-
|-
|000 0001 || style="background:lightblue;" | 001 || style="background:#cff;" | 1 || style="background:lightblue;" | 01 || colspan=3 | SOH start of heading
|1
|0x01
|00 00001
|SOH
|-
|-
|000 0002 || style="background:lightblue;" | 002 || style="background:#cff;" | 2 || style="background:lightblue;" | 02 || colspan=3 | STX start of text
|2
|0x02
|00 00010
|STX
|-
|-
|000 0003 || style="background:lightblue;" | 003 || style="background:#cff;" | 3 || style="background:lightblue;" | 03 || colspan=3 | ETX end of text
|3
|0x03
|00 00011
|ETX
|-
|-
|000 0004 || style="background:lightblue;" | 004 || style="background:#cff;" | 4 || style="background:lightblue;" | 04 || colspan=3 | EOT end of transmission
|4
|0x04
|00 00100
|EOT
|-
|-
|000 0005 || style="background:lightblue;" | 005 || style="background:#cff;" | 5 || style="background:lightblue;" | 05 || colspan=3 | ENQ enquiry
|5
|0x05
|00 00101
|ENQ
|-
|-
|000 0006 || style="background:lightblue;" | 006 || style="background:#cff;" | 6 || style="background:lightblue;" | 06 || colspan=3 | ACK acknowledge
|6
|0x06
|00 00110
|ACK
|-
|-
|000 0007 || style="background:lightblue;" | 007 || style="background:#cff;" | 7 || style="background:lightblue;" | 07 || colspan=3 | BEL bell
|7
|0x07
|00 00111
|BEL
|-
|-
|000 0008 || style="background:lightblue;" | 010 || style="background:#cff;" | 8 || style="background:lightblue;" | 08 || colspan=3 | BS backspace
|8
|0x08
|00 01000
|BS
|-
|-
|000 0009 || style="background:lightblue;" | 011 || style="background:#cff;" | 9 || style="background:lightblue;" | 09 || colspan=3 | TAB hoizontal tab
|9
|0x09
|00 01001
|HT
|-
|-
|000 0010 || style="background:lightblue;" | 012 || style="background:#cff;" | 10 || style="background:lightblue;" | 0A || colspan=3 | LF new line feed
|10
|0x0a
|00 01010
|LF
|-
|-
|000 0011 || style="background:lightblue;" | 013 || style="background:#cff;" | 11 || style="background:lightblue;" | 0B || colspan=3 | VT vertical tab
|11
|0x0b
|00 01011
|VT
|-
|-
|000 0012 || style="background:lightblue;" | 014 || style="background:#cff;" | 12 || style="background:lightblue;" | 0C || colspan=3 | FF new form feed
|12
|0x0c
|00 01100
|FF
|-
|-
|000 0013 || style="background:lightblue;" | 015 || style="background:#cff;" | 13 || style="background:lightblue;" | 0D || colspan=3 | CR carriage return
|13
|0x0d
|00 01101
|CR
|-
|-
|000 0014 || style="background:lightblue;" | 016 || style="background:#cff;" | 14 || style="background:lightblue;" | 0E || colspan=3 | SO shift out
|14
|0x0e
|00 01110
|SO
|-
|-
|000 0015 || style="background:lightblue;" | 017 || style="background:#cff;" | 15 || style="background:lightblue;" | 0F || colspan=3 | SI shift in
|15
|0x0f
|00 01111
|SI
|-
|-
|000 0016 || style="background:lightblue;" | 020 || style="background:#cff;" | 16 || style="background:lightblue;" | 10 || colspan=3 | DLE data link escape
|16
|0x10
|00 10000
|DLE
|-
|-
|000 0017 || style="background:lightblue;" | 021 || style="background:#cff;" | 17 || style="background:lightblue;" | 11 || colspan=3 | DC1 device control 1
|17
|0x11
|00 10001
|DC1
|-
|-
|000 0018 || style="background:lightblue;" | 022 || style="background:#cff;" | 18 || style="background:lightblue;" | 12 || colspan=3 | DC2 device control 2
|18
|0x12
|00 10010
|DC2
|-
|-
|000 0019 || style="background:lightblue;" | 023 || style="background:#cff;" | 19 || style="background:lightblue;" | 13 || colspan=3 | DC3 device control 3
|19
|0x13
|00 10011
|DC3
|-
|-
|000 0020 || style="background:lightblue;" | 024 || style="background:#cff;" | 20 || style="background:lightblue;" | 14 || colspan=3 | DC4 device control 4
|20
|0x14
|00 10100
|DC4
|-
|-
|000 0021 || style="background:lightblue;" | 025 || style="background:#cff;" | 21 || style="background:lightblue;" | 15 || colspan=3 | NAK negative acknowledge
|21
|0x15
|00 10101
|NAK
|-
|-
|000 0022 || style="background:lightblue;" | 026 || style="background:#cff;" | 22 || style="background:lightblue;" | 16 || colspan=3 | SYN syncronous idle
|22
|0x16
|00 10110
|SYN
|-
|-
|000 0023 || style="background:lightblue;" | 027 || style="background:#cff;" | 23 || style="background:lightblue;" | 17 || colspan=3 | ETB end of transmission block
|23
|0x17
|00 10111
|ETB
|-
|-
|000 0024 || style="background:lightblue;" | 030 || style="background:#cff;" | 24 || style="background:lightblue;" | 18 || colspan=3 | CAN cancel
|24
|0x18
|00 11000
|CAN
|-
|-
|000 0025 || style="background:lightblue;" | 031 || style="background:#cff;" | 25 || style="background:lightblue;" | 19 || colspan=3 | EM end of medium
|25
|0x19
|00 11001
|EM
|-
|-
|000 0026 || style="background:lightblue;" | 032 || style="background:#cff;" | 26 || style="background:lightblue;" | 1A || colspan=3 | SUB substitute
|26
|0x1a
|00 11010
|SUB
|-
|-
|000 0027 || style="background:lightblue;" | 033 || style="background:#cff;" | 27 || style="background:lightblue;" | 1B || colspan=3 | ESC escape
|27
|0x1b
|00 11011
|ESC
|-
|-
|000 0028 || style="background:lightblue;" | 034 || style="background:#cff;" | 28 || style="background:lightblue;" | 1C || colspan=3 | FS file seperator
|28
|0x1c
|00 11100
|FS
|-
|-
|000 0029 || style="background:lightblue;" | 035 || style="background:#cff;" | 29 || style="background:lightblue;" | 1D || colspan=3 | GS group seperator
|29
|0x1d
|00 11101
|GS
|-
|-
|000 0030 || style="background:lightblue;" | 036 || style="background:#cff;" | 30 || style="background:lightblue;" | 1E || colspan=3 | RS record seperator
|30
|0x1e
|00 11110
|RS
|-
|-
|000 0031 || style="background:lightblue;" | 037 || style="background:#cff;" | 31 || style="background:lightblue;" | 1F || colspan=3 | US unit seperator
|31
|0x1f
|00 11111
|US
|}
|}
 
|
 
{| class="wikitable"
{| class="wikitable" style="text-align: center;"
!Dec
|-
!Hex
! rowspan="2"|[[Binary numeral system|Binary]] !! rowspan="2"|[[Octal|Oct]] !! rowspan="2"|[[Decimal|Dec]] !! rowspan="2"|[[Hexadecimal|Hex]] !! colspan="3"|Glyph
!Binary
|-
!Char
! ’63 !! ’65 !! ’67
|-
|-
|010 0000 ||style="background:lightblue;"| 040 || style="background:#cff;"| 32 ||style="background:lightblue;"| 20 ||colspan=3|[[space (punctuation)|space]]
|32
|0x20
|01 00000
|SPACE
|-
|-
|010 0001 ||style="background:lightblue;"| 041 || style="background:#cff;"| 33 ||style="background:lightblue;"| 21 ||colspan=3|<span class="nounderlines">[[Exclamation mark|!]]</span>
|33
|0x21
|01 00001
|!
|-
|-
|010 0010 ||style="background:lightblue;"| 042 || style="background:#cff;"| 34 ||style="background:lightblue;"| 22 ||colspan=3|<span class="nounderlines">[[Quotation mark|"]]</span>
|34
|0x22
|01 00010
|"
|-
|-
|010 0011 ||style="background:lightblue;"| 043 || style="background:#cff;"| 35 ||style="background:lightblue;"| 23 ||colspan=3|<span class="nounderlines">[[Number sign|#]]</span>
|35
|0x23
|01 00011
|#
|-
|-
|010 0100 ||style="background:lightblue;"| 044 || style="background:#cff;"| 36 ||style="background:lightblue;"| 24 ||colspan=3|<span class="nounderlines">[[Dollar sign|$]]</span>
|36
|0x24
|01 00100
|$
|-
|-
|010 0101 ||style="background:lightblue;"| 045 || style="background:#cff;"| 37 ||style="background:lightblue;"| 25 ||colspan=3|<span class="nounderlines">[[Percent sign|%]]</span>
|37
|0x25
|01 00101
|%
|-
|-
|010 0110 ||style="background:lightblue;"| 046 || style="background:#cff;"| 38 ||style="background:lightblue;"| 26 ||colspan=3|<span class="nounderlines">[[Ampersand|&]]</span>
|38
|0x26
|01 00110
|&
|-
|-
|010 0111 ||style="background:lightblue;"| 047 || style="background:#cff;"| 39 ||style="background:lightblue;"| 27 ||colspan=3|<span class="nounderlines">[[Apostrophe|']]</span>
|39
|0x27
|01 00111
|'
|-
|-
|010 1000 ||style="background:lightblue;"| 050 || style="background:#cff;"| 40 ||style="background:lightblue;"| 28 ||colspan=3|<span class="nounderlines">[[Left parenthesis|(]]</span>
|40
|0x28
|01 01000
|(
|-
|-
|010 1001 ||style="background:lightblue;"| 051 || style="background:#cff;"| 41 ||style="background:lightblue;"| 29 ||colspan=3|<span class="nounderlines">[[Right parenthesis|)]]</span>
|41
|0x29
|01 01001
|)
|-
|-
|010 1010 ||style="background:lightblue;"| 052 || style="background:#cff;"| 42 ||style="background:lightblue;"| 2A ||colspan=3|<span class="nounderlines">[[Asterisk|*]]</span>
|42
|0x2a
|01 01010
|*
|-
|-
|010 1011 ||style="background:lightblue;"| 053 || style="background:#cff;"| 43 ||style="background:lightblue;"| 2B ||colspan=3|<span class="nounderlines">[[Plus sign|+]]</span>
|43
|0x2b
|01 01011
| +
|-
|-
|010 1100 ||style="background:lightblue;"| 054 || style="background:#cff;"| 44 ||style="background:lightblue;"| 2C ||colspan=3|<span class="nounderlines">[[Comma|,]]</span>
|44
|0x2c
|01 01100
|,
|-
|-
|010 1101 ||style="background:lightblue;"| 055 || style="background:#cff;"| 45 ||style="background:lightblue;"| 2D ||colspan=3|<span class="nounderlines">[[Hyphen-minus|-]]</span>
|45
|0x2d
|01 01101
| -
|-
|-
|010 1110 ||style="background:lightblue;"| 056 || style="background:#cff;"| 46 ||style="background:lightblue;"| 2E ||colspan=3|<span class="nounderlines">[[Full stop|.]]</span>
|46
|0x2e
|01 01110
|.
|-
|-
|010 1111 ||style="background:lightblue;"| 057 || style="background:#cff;"| 47 ||style="background:lightblue;"| 2F ||colspan=3|<span class="nounderlines">[[Slash (punctuation)|/]]</span>
|47
|0x2f
|01 01111
|/
|-
|-
|011 0000 ||style="background:lightblue;"| 060 || style="background:#cff;"| 48 ||style="background:lightblue;"| 30 ||colspan=3|<span class="nounderlines">[[0 (number)|0]]</span>
|48
|0x30
|01 10000
|0
|-
|-
|011 0001 ||style="background:lightblue;"| 061 || style="background:#cff;"| 49 ||style="background:lightblue;"| 31 ||colspan=3|<span class="nounderlines">[[1 (number)|1]]</span>
|49
|0x31
|01 10001
|1
|-
|-
|011 0010 ||style="background:lightblue;"| 062 || style="background:#cff;"| 50 ||style="background:lightblue;"| 32 ||colspan=3|<span class="nounderlines">[[2 (number)|2]]</span>
|50
|0x32
|01 10010
|2
|-
|-
|011 0011 ||style="background:lightblue;"| 063 || style="background:#cff;"| 51 ||style="background:lightblue;"| 33 ||colspan=3|<span class="nounderlines">[[3 (number)|3]]</span>
|51
|0x33
|01 10011
|3
|-
|-
|011 0100 ||style="background:lightblue;"| 064 || style="background:#cff;"| 52 ||style="background:lightblue;"| 34 ||colspan=3|<span class="nounderlines">[[4 (number)|4]]</span>
|52
|0x34
|01 10100
|4
|-
|-
|011 0101 ||style="background:lightblue;"| 065 || style="background:#cff;"| 53 ||style="background:lightblue;"| 35 ||colspan=3|<span class="nounderlines">[[5 (number)|5]]</span>
|53
|0x35
|01 10101
|5
|-
|-
|011 0110 ||style="background:lightblue;"| 066 || style="background:#cff;"| 54 ||style="background:lightblue;"| 36 ||colspan=3|<span class="nounderlines">[[6 (number)|6]]</span>
|54
|0x36
|01 10110
|6
|-
|-
|011 0111 ||style="background:lightblue;"| 067 || style="background:#cff;"| 55 ||style="background:lightblue;"| 37 ||colspan=3|<span class="nounderlines">[[7 (number)|7]]</span>
|55
|0x37
|01 10111
|7
|-
|-
|011 1000 ||style="background:lightblue;"| 070 || style="background:#cff;"| 56 ||style="background:lightblue;"| 38 ||colspan=3|<span class="nounderlines">[[8 (number)|8]]</span>
|56
|0x38
|01 11000
|8
|-
|-
|011 1001 ||style="background:lightblue;"| 071 || style="background:#cff;"| 57 ||style="background:lightblue;"| 39 ||colspan=3|<span class="nounderlines">[[9 (number)|9]]</span>
|57
|0x39
|01 11001
|9
|-
|-
|011 1010 ||style="background:lightblue;"| 072 || style="background:#cff;"| 58 ||style="background:lightblue;"| 3A ||colspan=3|<span class="nounderlines">[[Colon (punctuation)|:]]</span>
|58
|0x3a
|01 11010
|:
|-
|-
|011 1011 ||style="background:lightblue;"| 073 || style="background:#cff;"| 59 ||style="background:lightblue;"| 3B ||colspan=3|<span class="nounderlines">[[Semicolon|;]]</span>
|59
|0x3b
|01 11011
|;
|-
|-
|011 1100 ||style="background:lightblue;"| 074 || style="background:#cff;"| 60 ||style="background:lightblue;"| 3C ||colspan=3|<span class="nounderlines">[[Less-than sign|<]]</span>
|60
|0x3c
|01 11100
|<
|-
|-
|011 1101 ||style="background:lightblue;"| 075 || style="background:#cff;"| 61 ||style="background:lightblue;"| 3D ||colspan=3|<span class="nounderlines">[[Equals sign|=]]</span>
|61
|0x3d
|01 11101
|=
|-
|-
|011 1110 ||style="background:lightblue;"| 076 || style="background:#cff;"| 62 ||style="background:lightblue;"| 3E ||colspan=3|<span class="nounderlines">[[Greater-than sign|>]]</span>
|62
|0x3e
|01 11110
|>
|-
|-
|011 1111 ||style="background:lightblue;"| 077 || style="background:#cff;"| 63 ||style="background:lightblue;"| 3F ||colspan=3|<span class="nounderlines">[[Question mark|?]]</span>
|63
|0x3f
|01 11111
|?
|}
|}
 
|
 
{| class="wikitable"
{| class="wikitable fixed" style="text-align:center;margin-left:1em"
!Dec
|- style="vertical-align:center;"
!Hex
! rowspan="2"|Binary !! rowspan="2"|Oct !! rowspan="2"|Dec !! rowspan="2"|Hex !! colspan="3"|Glyph
!Binary
|-
!Char
! ’63 !! ’65 !! ’67
|-
|-
|100 0000 ||style="background:lightblue;"| 100 || style="background:#cff;"| 64 ||style="background:lightblue;"| 40 || <span class="nounderlines">[[At sign|@]]</span> || <span class="nounderlines">[[Grave accent|`]]</span> || <span class="nounderlines">[[At sign|@]]</span>
|64
|0x40
|10 00000
|@
|-
|-
|100 0001 ||style="background:lightblue;"| 101 || style="background:#cff;"| 65 ||style="background:lightblue;"| 41 ||colspan=3|<span class="nounderlines">[[A]]</span>
|65
|0x41
|10 00001
|A
|-
|-
|100 0010 ||style="background:lightblue;"| 102 || style="background:#cff;"| 66 ||style="background:lightblue;"| 42 ||colspan=3|<span class="nounderlines">[[B]]</span>
|66
|0x42
|10 00010
|B
|-
|-
|100 0011 ||style="background:lightblue;"| 103 || style="background:#cff;"| 67 ||style="background:lightblue;"| 43 ||colspan=3|<span class="nounderlines">[[C]]</span>
|67
|0x43
|10 00011
|C
|-
|-
|100 0100 ||style="background:lightblue;"| 104 || style="background:#cff;"| 68 ||style="background:lightblue;"| 44 ||colspan=3|<span class="nounderlines">[[D]]</span>
|68
|0x44
|10 00100
|D
|-
|-
|100 0101 ||style="background:lightblue;"| 105 || style="background:#cff;"| 69 ||style="background:lightblue;"| 45 ||colspan=3|<span class="nounderlines">[[E]]</span>
|69
|0x45
|10 00101
|E
|-
|-
|100 0110 ||style="background:lightblue;"| 106 || style="background:#cff;"| 70 ||style="background:lightblue;"| 46 ||colspan=3|<span class="nounderlines">[[F]]</span>
|70
|0x46
|10 00110
|F
|-
|-
|100 0111 ||style="background:lightblue;"| 107 || style="background:#cff;"| 71 ||style="background:lightblue;"| 47 ||colspan=3|<span class="nounderlines">[[G]]</span>
|71
|0x47
|10 00111
|G
|-
|-
|100 1000 ||style="background:lightblue;"| 110 || style="background:#cff;"| 72 ||style="background:lightblue;"| 48 ||colspan=3|<span class="nounderlines">[[H]]</span>
|72
|0x48
|10 01000
|H
|-
|-
|100 1001 ||style="background:lightblue;"| 111 || style="background:#cff;"| 73 ||style="background:lightblue;"| 49 ||colspan=3|<span class="nounderlines">[[I]]</span>
|73
|0x49
|10 01001
|I
|-
|-
|100 1010 ||style="background:lightblue;"| 112 || style="background:#cff;"| 74 ||style="background:lightblue;"| 4A ||colspan=3|<span class="nounderlines">[[J]]</span>
|74
|0x4a
|10 01010
|J
|-
|-
|100 1011 ||style="background:lightblue;"| 113 || style="background:#cff;"| 75 ||style="background:lightblue;"| 4B ||colspan=3|<span class="nounderlines">[[K]]</span>
|75
|0x4b
|10 01011
|K
|-
|-
|100 1100 ||style="background:lightblue;"| 114 || style="background:#cff;"| 76 ||style="background:lightblue;"| 4C ||colspan=3|<span class="nounderlines">[[L]]</span>
|76
|0x4c
|10 01100
|L
|-
|-
|100 1101 ||style="background:lightblue;"| 115 || style="background:#cff;"| 77 ||style="background:lightblue;"| 4D ||colspan=3|<span class="nounderlines">[[M]]</span>
|77
|0x4d
|10 01101
|M
|-
|-
|100 1110 ||style="background:lightblue;"| 116 || style="background:#cff;"| 78 ||style="background:lightblue;"| 4E ||colspan=3|<span class="nounderlines">[[N]]</span>
|78
|0x4e
|10 01110
|N
|-
|-
|100 1111 ||style="background:lightblue;"| 117 || style="background:#cff;"| 79 ||style="background:lightblue;"| 4F ||colspan=3|<span class="nounderlines">[[O]]</span>
|79
|0x4f
|10 01111
|O
|-
|-
|101 0000 ||style="background:lightblue;"| 120 || style="background:#cff;"| 80 ||style="background:lightblue;"| 50 ||colspan=3|<span class="nounderlines">[[P]]</span>
|80
|0x50
|10 10000
|P
|-
|-
|101 0001 ||style="background:lightblue;"| 121 || style="background:#cff;"| 81 ||style="background:lightblue;"| 51 ||colspan=3|<span class="nounderlines">[[Q]]</span>
|81
|0x51
|10 10001
|Q
|-
|-
|101 0010 ||style="background:lightblue;"| 122 || style="background:#cff;"| 82 ||style="background:lightblue;"| 52 ||colspan=3|<span class="nounderlines">[[R]]</span>
|82
|0x52
|10 10010
|R
|-
|-
|101 0011 ||style="background:lightblue;"| 123 || style="background:#cff;"| 83 ||style="background:lightblue;"| 53 ||colspan=3|<span class="nounderlines">[[S]]</span>
|83
|0x53
|10 10011
|S
|-
|-
|101 0100 ||style="background:lightblue;"| 124 || style="background:#cff;"| 84 ||style="background:lightblue;"| 54 ||colspan=3|<span class="nounderlines">[[T]]</span>
|84
|0x54
|10 10100
|T
|-
|-
|101 0101 ||style="background:lightblue;"| 125 || style="background:#cff;"| 85 ||style="background:lightblue;"| 55 ||colspan=3|<span class="nounderlines">[[U]]</span>
|85
|0x55
|10 10101
|U
|-
|-
|101 0110 ||style="background:lightblue;"| 126 || style="background:#cff;"| 86 ||style="background:lightblue;"| 56 ||colspan=3|<span class="nounderlines">[[V]]</span>
|86
|0x56
|10 10110
|V
|-
|-
|101 0111 ||style="background:lightblue;"| 127 || style="background:#cff;"| 87 ||style="background:lightblue;"| 57 ||colspan=3|<span class="nounderlines">[[W]]</span>
|87
|0x57
|10 10111
|W
|-
|-
|101 1000 ||style="background:lightblue;"| 130 || style="background:#cff;"| 88 ||style="background:lightblue;"| 58 ||colspan=3|<span class="nounderlines">[[X]]</span>
|88
|0x58
|10 11000
|X
|-
|-
|101 1001 ||style="background:lightblue;"| 131 || style="background:#cff;"| 89 ||style="background:lightblue;"| 59 ||colspan=3|<span class="nounderlines">[[Y]]</span>
|89
|0x59
|10 11001
|Y
|-
|-
|101 1010 ||style="background:lightblue;"| 132 || style="background:#cff;"| 90 ||style="background:lightblue;"| 5A ||colspan=3|<span class="nounderlines">[[Z]]</span>
|90
|0x5a
|10 11010
|Z
|-
|-
|101 1011 ||style="background:lightblue;"| 133 || style="background:#cff;"| 91 ||style="background:lightblue;"| 5B ||colspan=3|<span class="nounderlines">[[Left square bracket|<nowiki>[</nowiki>]]</span>
|91
|0x5b
|10 11011
|[
|-
|-
|101 1100 ||style="background:lightblue;"| 134 || style="background:#cff;"| 92 ||style="background:lightblue;"| 5C || <span class="nounderlines">[[Backslash|\]]</span> || <span class="nounderlines">[[Tilde|~]]</span> || <span class="nounderlines">[[Backslash|\]]</span>
|92
|0x5c
|10 11100
|\
|-
|-
|101 1101 ||style="background:lightblue;"| 135 || style="background:#cff;"| 93 ||style="background:lightblue;"| 5D ||colspan=3|<span class="nounderlines">[[Right square bracket|<nowiki>]</nowiki>]]</span>
|93
|0x5d
|10 11101
|]
|-
|-
|101 1110 ||style="background:lightblue;"| 136 || style="background:#cff;"| 94 ||style="background:lightblue;"| 5E || <span class="nounderlines">[[Up arrow (symbol)|↑]]</span> ||colspan=2|<span class="nounderlines">[[Caret|^]]</span>
|94
|0x5e
|10 11110
|^
|-
|-
|101 1111 ||style="background:lightblue;"| 137 || style="background:#cff;"| 95 ||style="background:lightblue;"| 5F || <span class="nounderlines">[[Left arrow (symbol)|←]]</span> ||colspan=2|<span class="nounderlines">[[Underscore|_]]</span>
|95
|0x5f
|10 11111
|_
|}
|}
 
|
 
{| class="wikitable"
{| class="wikitable fixed" style="text-align:center;margin-left:1em"
!Dec
|- style="vertical-align:center;"
!Hex
! rowspan="2"|Binary !! rowspan="2"|Oct !! rowspan="2"|Dec !! rowspan="2"|Hex !! colspan="3"|Glyph
!Binary
!Char
|-
|-
! ’63 !! ’65 !! ’67
|96
|0x60
|11 00000
|`
|-
|-
|110 0000 ||style="background:lightblue;"| 140 || style="background:#cff;"| 96 ||style="background:lightblue;"| 60 ||  || <span class="nounderlines">[[At sign|@]]</span> || <span class="nounderlines">[[Grave accent|`]]</span>
|97
|0x61
|11 00001
|a
|-
|-
|110 0001 ||style="background:lightblue;"| 141 || style="background:#cff;"| 97 ||style="background:lightblue;"| 61 ||  ||colspan=2|<span class="nounderlines">[[a]]</span>
|98
|0x62
|11 00010
|b
|-
|-
|110 0010 ||style="background:lightblue;"| 142 || style="background:#cff;"| 98 ||style="background:lightblue;"| 62 ||  ||colspan=2|<span class="nounderlines">[[b]]</span>
|99
|0x63
|11 00011
|c
|-
|-
|110 0011 ||style="background:lightblue;"| 143 || style="background:#cff;"| 99 ||style="background:lightblue;"| 63 ||  ||colspan=2|<span class="nounderlines">[[c]]</span>
|100
|0x64
|11 00100
|d
|-
|-
|110 0100 ||style="background:lightblue;"| 144 || style="background:#cff;"| 100 ||style="background:lightblue;"| 64 ||  ||colspan=2|<span class="nounderlines">[[d]]</span>
|101
|0x65
|11 00101
|e
|-
|-
|110 0101 ||style="background:lightblue;"| 145 || style="background:#cff;"| 101 ||style="background:lightblue;"| 65 ||  ||colspan=2|<span class="nounderlines">[[e]]</span>
|102
|0x66
|11 00110
|f
|-
|-
|110 0110 ||style="background:lightblue;"| 146 || style="background:#cff;"| 102 ||style="background:lightblue;"| 66 ||  ||colspan=2|<span class="nounderlines">[[f]]</span>
|103
|0x67
|11 00111
|g
|-
|-
|110 0111 ||style="background:lightblue;"| 147 || style="background:#cff;"| 103 ||style="background:lightblue;"| 67 ||  ||colspan=2|<span class="nounderlines">[[g]]</span>
|104
|0x68
|11 01000
|h
|-
|-
|110 1000 ||style="background:lightblue;"| 150 || style="background:#cff;"| 104 ||style="background:lightblue;"| 68 ||  ||colspan=2|<span class="nounderlines">[[h]]</span>
|105
|0x69
|11 01001
|i
|-
|-
|110 1001 ||style="background:lightblue;"| 151 || style="background:#cff;"| 105 ||style="background:lightblue;"| 69 ||  ||colspan=2|<span class="nounderlines">[[i]]</span>
|106
|0x6a
|11 01010
|j
|-
|-
|110 1010 ||style="background:lightblue;"| 152 || style="background:#cff;"| 106 ||style="background:lightblue;"| 6A ||  ||colspan=2|<span class="nounderlines">[[j]]</span>
|107
|0x6b
|11 01011
|k
|-
|-
|110 1011 ||style="background:lightblue;"| 153 || style="background:#cff;"| 107 ||style="background:lightblue;"| 6B ||  ||colspan=2|<span class="nounderlines">[[k]]</span>
|108
|0x6c
|11 01100
|l
|-
|-
|110 1100 ||style="background:lightblue;"| 154 || style="background:#cff;"| 108 ||style="background:lightblue;"| 6C ||  ||colspan=2|<span class="nounderlines">[[l]]</span>
|109
|0x6d
|11 01101
|m
|-
|-
|110 1101 ||style="background:lightblue;"| 155 || style="background:#cff;"| 109 ||style="background:lightblue;"| 6D ||  ||colspan=2|<span class="nounderlines">[[m]]</span>
|110
|0x6e
|11 01110
|n
|-
|-
|110 1110 ||style="background:lightblue;"| 156 || style="background:#cff;"| 110 ||style="background:lightblue;"| 6E ||  ||colspan=2|<span class="nounderlines">[[n]]</span>
|111
|0x6f
|11 01111
|o
|-
|-
|110 1111 ||style="background:lightblue;"| 157 || style="background:#cff;"| 111 ||style="background:lightblue;"| 6F ||  ||colspan=2|<span class="nounderlines">[[o]]</span>
|112
|0x70
|11 10000
|p
|-
|-
|111 0000 ||style="background:lightblue;"| 160 || style="background:#cff;"| 112 ||style="background:lightblue;"| 70 ||  ||colspan=2|<span class="nounderlines">[[p]]</span>
|113
|0x71
|11 10001
|q
|-
|-
|111 0001 ||style="background:lightblue;"| 161 || style="background:#cff;"| 113 ||style="background:lightblue;"| 71 ||  ||colspan=2|<span class="nounderlines">[[q]]</span>
|114
|0x72
|11 10010
|r
|-
|-
|111 0010 ||style="background:lightblue;"| 162 || style="background:#cff;"| 114 ||style="background:lightblue;"| 72 ||  ||colspan=2|<span class="nounderlines">[[r]]</span>
|115
|0x73
|11 10011
|s
|-
|-
|111 0011 ||style="background:lightblue;"| 163 || style="background:#cff;"| 115 ||style="background:lightblue;"| 73 ||  ||colspan=2|<span class="nounderlines">[[s]]</span>
|116
|0x74
|11 10100
|t
|-
|-
|111 0100 ||style="background:lightblue;"| 164 || style="background:#cff;"| 116 ||style="background:lightblue;"| 74 ||  ||colspan=2|<span class="nounderlines">[[t]]</span>
|117
|0x75
|11 10101
|u
|-
|-
|111 0101 ||style="background:lightblue;"| 165 || style="background:#cff;"| 117 ||style="background:lightblue;"| 75 ||  ||colspan=2|<span class="nounderlines">[[u]]</span>
|118
|0x76
|11 10110
|v
|-
|-
|111 0110 ||style="background:lightblue;"| 166 || style="background:#cff;"| 118 ||style="background:lightblue;"| 76 ||  ||colspan=2|<span class="nounderlines">[[v]]</span>
|119
|0x77
|11 10111
|w
|-
|-
|111 0111 ||style="background:lightblue;"| 167 || style="background:#cff;"| 119 ||style="background:lightblue;"| 77 ||  ||colspan=2|<span class="nounderlines">[[w]]</span>
|120
|0x78
|11 11000
|x
|-
|-
|111 1000 ||style="background:lightblue;"| 170 || style="background:#cff;"| 120 ||style="background:lightblue;"| 78 ||  ||colspan=2|<span class="nounderlines">[[x]]</span>
|121
|0x79
|11 11001
|y
|-
|-
|111 1001 ||style="background:lightblue;"| 171 || style="background:#cff;"| 121 ||style="background:lightblue;"| 79 ||  ||colspan=2|<span class="nounderlines">[[y]]</span>
|122
|0x7a
|11 11010
|z
|-
|-
|111 1010 ||style="background:lightblue;"| 172 || style="background:#cff;"| 122 ||style="background:lightblue;"| 7A ||  ||colspan=2|<span class="nounderlines">[[z]]</span>
|123
|0x7b
|11 11011
|{
|-
|-
|111 1011 ||style="background:lightblue;"| 173 || style="background:#cff;"| 123 ||style="background:lightblue;"| 7B ||  ||colspan=2|<span class="nounderlines">[[Left curly bracket|{]]</span>
|124
|0x7c
|11 11100
|<nowiki>|</nowiki>
|-
|-
|111 1100 ||style="background:lightblue;"| 174 || style="background:#cff;"| 124 ||style="background:lightblue;"| 7C || [[Acknowledge character|ACK]] || <span class="nounderlines">[[Not sign|¬]]</span> || <span class="nounderlines">[[Vertical bar|<nowiki>|</nowiki>]]</span>
|125
|0x7d
|11 11101
| }
|-
|-
|111 1101 ||style="background:lightblue;"| 175 || style="background:#cff;"| 125 ||style="background:lightblue;"| 7D ||  ||colspan=2|<span class="nounderlines">[[Right curly bracket|}]]</span>
|126
|0x7e
|11 11110
|~
|-
|-
|111 1110 ||style="background:lightblue;"| 176 || style="background:#cff;"| 126 ||style="background:lightblue;"| 7E || [[Escape character|ESC]] || <span class="nounderlines">[[Vertical bar|<nowiki>|</nowiki>]]</span> || <span class="nounderlines">[[Tilde|~]]</span>
|127
|0x7f
|11 11111
|DEL
|}
|}
|}


== See Also ==
== See Also ==
* https://en.wikipedia.org/wiki/ASCII
* <nowiki>https://en.wikipedia.org/wiki/ASCII</nowiki>
* <nowiki>https://www.aivosto.com/articles/control-characters.html</nowiki>




{{Navbox Tinkering}}[[Category:Tinkering]]
{{Navbox Tinkering}}[[Category:Tinkering]]

Latest revision as of 23:16, 18 January 2023

ASCII (American Standard Code for Information Interchange) is a character encoding using 7 bits per character. Its history comes from the development of connecting computers (terminals) to teleprinters which required some standardized way to send and receive data as well as a way to control data flow. As a result, ASCII contains a bunch of control characters in the lower set.

Terminals convert keys from your keyboard into ASCII. The 5 lower bits of the character set mapped to a key on the keyboard. The 6th and 7th bit are set to 1 by default and are cleared the shift key and control key, respectively.

Your terminal will automatically convert specific key combinations into the appropriate character (eg. pressing Shift-1 or '!' sends the appropriate ASCII character). The terminal can also send the appropriate control character with the control modifier key. For example, pressing Ctrl-i, ^I, sends a horizontal tabulation (HT) or tab control character.

ASCII Table

Key modifiers: Control Key modifiers: ? Key modifiers: Shift Key modifiers: None
Dec Hex Binary Char
0 0x00 00 00000 NUL
1 0x01 00 00001 SOH
2 0x02 00 00010 STX
3 0x03 00 00011 ETX
4 0x04 00 00100 EOT
5 0x05 00 00101 ENQ
6 0x06 00 00110 ACK
7 0x07 00 00111 BEL
8 0x08 00 01000 BS
9 0x09 00 01001 HT
10 0x0a 00 01010 LF
11 0x0b 00 01011 VT
12 0x0c 00 01100 FF
13 0x0d 00 01101 CR
14 0x0e 00 01110 SO
15 0x0f 00 01111 SI
16 0x10 00 10000 DLE
17 0x11 00 10001 DC1
18 0x12 00 10010 DC2
19 0x13 00 10011 DC3
20 0x14 00 10100 DC4
21 0x15 00 10101 NAK
22 0x16 00 10110 SYN
23 0x17 00 10111 ETB
24 0x18 00 11000 CAN
25 0x19 00 11001 EM
26 0x1a 00 11010 SUB
27 0x1b 00 11011 ESC
28 0x1c 00 11100 FS
29 0x1d 00 11101 GS
30 0x1e 00 11110 RS
31 0x1f 00 11111 US
Dec Hex Binary Char
32 0x20 01 00000 SPACE
33 0x21 01 00001 !
34 0x22 01 00010 "
35 0x23 01 00011 #
36 0x24 01 00100 $
37 0x25 01 00101 %
38 0x26 01 00110 &
39 0x27 01 00111 '
40 0x28 01 01000 (
41 0x29 01 01001 )
42 0x2a 01 01010 *
43 0x2b 01 01011 +
44 0x2c 01 01100 ,
45 0x2d 01 01101 -
46 0x2e 01 01110 .
47 0x2f 01 01111 /
48 0x30 01 10000 0
49 0x31 01 10001 1
50 0x32 01 10010 2
51 0x33 01 10011 3
52 0x34 01 10100 4
53 0x35 01 10101 5
54 0x36 01 10110 6
55 0x37 01 10111 7
56 0x38 01 11000 8
57 0x39 01 11001 9
58 0x3a 01 11010 :
59 0x3b 01 11011 ;
60 0x3c 01 11100 <
61 0x3d 01 11101 =
62 0x3e 01 11110 >
63 0x3f 01 11111 ?
Dec Hex Binary Char
64 0x40 10 00000 @
65 0x41 10 00001 A
66 0x42 10 00010 B
67 0x43 10 00011 C
68 0x44 10 00100 D
69 0x45 10 00101 E
70 0x46 10 00110 F
71 0x47 10 00111 G
72 0x48 10 01000 H
73 0x49 10 01001 I
74 0x4a 10 01010 J
75 0x4b 10 01011 K
76 0x4c 10 01100 L
77 0x4d 10 01101 M
78 0x4e 10 01110 N
79 0x4f 10 01111 O
80 0x50 10 10000 P
81 0x51 10 10001 Q
82 0x52 10 10010 R
83 0x53 10 10011 S
84 0x54 10 10100 T
85 0x55 10 10101 U
86 0x56 10 10110 V
87 0x57 10 10111 W
88 0x58 10 11000 X
89 0x59 10 11001 Y
90 0x5a 10 11010 Z
91 0x5b 10 11011 [
92 0x5c 10 11100 \
93 0x5d 10 11101 ]
94 0x5e 10 11110 ^
95 0x5f 10 11111 _
Dec Hex Binary Char
96 0x60 11 00000 `
97 0x61 11 00001 a
98 0x62 11 00010 b
99 0x63 11 00011 c
100 0x64 11 00100 d
101 0x65 11 00101 e
102 0x66 11 00110 f
103 0x67 11 00111 g
104 0x68 11 01000 h
105 0x69 11 01001 i
106 0x6a 11 01010 j
107 0x6b 11 01011 k
108 0x6c 11 01100 l
109 0x6d 11 01101 m
110 0x6e 11 01110 n
111 0x6f 11 01111 o
112 0x70 11 10000 p
113 0x71 11 10001 q
114 0x72 11 10010 r
115 0x73 11 10011 s
116 0x74 11 10100 t
117 0x75 11 10101 u
118 0x76 11 10110 v
119 0x77 11 10111 w
120 0x78 11 11000 x
121 0x79 11 11001 y
122 0x7a 11 11010 z
123 0x7b 11 11011 {
124 0x7c 11 11100 |
125 0x7d 11 11101 }
126 0x7e 11 11110 ~
127 0x7f 11 11111 DEL


See Also

  • https://en.wikipedia.org/wiki/ASCII
  • https://www.aivosto.com/articles/control-characters.html