Code & Mathematical Expression Language in Life Notes
Code & Mathematical Expression Language in Life
- Goals:
- Explore how math systems resemble language.
- Facilitate language analysis.
- Model language.
- Understand the fundamental symbolic underpinnings of mathematical expressions.
Code
- A regularized system of meaningful symbols found in:
- Human languages
- Mathematical expressions
- Programming codes
Mathematics
- Definitions:
- "The science of quantity"
- "All mathematics is symbolic logic"
- A system of expressing numeric values.
- Mathematical expressions use a coded system.
Numerals, Numeric Glyphs, and Numbers
- Numeral:
- A unit of language that expresses a quantity or amount, or number.
- Numeric Glyph:
- A unit of writing that represents a numeral or its corresponding quantity/number.
- Numeral characters (numeric glyphs):
- As pictograms:
- = the amount of one (number/concept).
- = the amount of two.
- = the amount of ten.
- etc.
- As logograms:
- = one
- = two
- = ten
- etc.
- As pictograms:
Numeral Systems
- Hindu-Arabic numeric glyphs:
- Some with iconic origins:
- Hindu-Arabic numeric glyphs:
- Some with origins in older systems:
- Possibly acrophonic (e.g., origin of 5 resembles letter for first consonant of panca).
- Or, alphanumeric (e.g., 6 has same origin as 6th glyph in Arabic abjad).
- Compare with Greek numerals:
- Some with origins in older systems:
Symbolic Expressions
- Expression:
- Any meaningful symbol or combo of symbols.
- Statement/Assertion:
- An expression that can be true or false.
- Question:
- Checks for truth/falsehood.
- Term:
- An expression that is a participant/argument of a statement or a question.
- Some symbol signifying a quantity or amount (e.g., one, two, 1, 2).
- Terms have values.
- c.f. nouns identify reference / concepts / categories
- Symbolism of operators:
- Words/glyphs representing operations, functions.
- Examples:
- Complex Term:
- A quantity expressed through a combination of symbols.
- Examples:
- Interpreted with a grammar, ordering of characters, operators, and parentheses.
Linguistic & Mathematical Statements
Statements:
- Expressions that can be true or false.
- Example:
- Asif sees Yael.
- Asif sees Yael:
- Contains a verb "see" with two arguments (subject & object; one who sees, one who is seen).
- An expression with terms and operators.
- Operator with two arguments ().
- is a relational operator that asserts identity of value for two arguments ( and ).
- Mathematical schooling trains how to resolve more complex terms to simpler terms.
Terms and statements can differ in their structure across systems of expression:
Order of Magnitude
- A degree of quantity oriented to the numeric base.
- Quantities larger than the base are expressed with symbolic complexity.
- In the decimal system:
- Each value between 0-9 has a simple glyph.
- is "symbolically complex".
- Each additional column represents another order of magnitude (“ones,” “tens,” “hundreds”).
- Base 8 System:
- b8 b10
- …
- Base 6 System:
- b6 b10
- …
Binary Numeric Systems
Binary numbers: base 2 numeral system.
- b2 b10
Binary:
- Information encoded using on/off or yes/no.
- on = 1, off = 0.
- Each “spot” or column is a bit.
- A chunk of bits is a byte.
*Binary numbers, as 4-bit expressions: - Using symbols:
8-digit system = 8 bits per byte.
- Range of 00000000 (0) to 11111111 (255).
- 256 possible values in an 8 bit space.
Used in many computing contexts:
- Internet Protocol (IP) addresses: 255.255.255.255
- RGB (red-green-blue) values: 255.255.255
- ASCII: 256 glyphs in basic typeset
- Max # of rupees for Link in Legend of Zelda
Other binary systems:
- Looms, music boxes
- Morse code
- Punch cards
Extensions of Mathematical Expression in Programming Languages
- Terms can be non-numeric.
- Operators can be non-arithmetic.
- Statements use more operators aside from
- Computers interface between levels of code.
Levels of Code
- Low-level vs. high-level:
- HL: characters, human-readable commands.
- LL: bits, bytes, cryptic commands.
- All data & expression is reducible to binary.
Low-Level Code
- Programmatic expressions that interface with circuitry & machinery.
- Expressions in binary notation.
- Statements, commands, terms.
- Lexical expression of command: arbitrary.
- Programmatic expressions that interface with circuitry & machinery.
- expression matches physical characteristics of the medium.
- "Phonological" expression of statement: iconic.
Code and Computers
- Code:
- A system of symbols and rules for expressing information in a form usable by a computer.
- Generally used to get a computer to do something that a human wants it to do.
- Code is commands, whereas human language is not (generally).
- Constructions with embedded statements and terms.
Expressions in Code
- A system with terms, operators, statements.
- Terms may be variables or constants.
- Operators include functions.
- Wider range of statements.
- Statements may resolve to TRUE or FALSE.
- “Control” statements – ask questions.
- Terms:
- Constants:
- Variables (representing numbers, arrays, strings):
- Constants:
- Terms as commands:
> i 2> 2 + 3 5- `> k