mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-10-10 06:51:13 +00:00
Website snapshot
This commit is contained in:
parent
ee0ab66d73
commit
50ec3688a5
281 changed files with 21066 additions and 0 deletions
15
content/research/progcomp/strings.md
Normal file
15
content/research/progcomp/strings.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Strings
|
||||
|
||||
## Character Codes
|
||||
|
||||
Character codes are mappings between numbers and symbols which make up a particular alphabet.
|
||||
|
||||
The *American Standard Code for Information Interchange* (ASCII) is a single-byte character code where $2^7 = 128$ characters are specified.
|
||||
|
||||
Symbol assignments were not done at random. Several interesting properties of the design make programming tasks easier:
|
||||
|
||||
- All non-printable characters have either the first three bits as zero or all seven lowest bits as one. This makes it easy to eliminate them before displaying junk.
|
||||
- Both the upper and lower case letters and the numerical digits appear sequentially
|
||||
- We can get the numeric order of a letter by subtracting the first letter
|
||||
- We can convert a character from uppercase to lowercase by $Letter - "A" + "a"$
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue