Changes

Jump to: navigation, search

Winter 2022 SPO600 Weekly Schedule

242 bytes added, 10:42, 6 September 2022
Binary Representation of Data
*** Logically: false or true.
** Binary numbers are resistant to errors, especially when compared to other systems such as analog voltages.
*** To represent the numbers 0-5 10 as an analog electical value, we could use a voltage from 0 - 5 10 volts. However, if we use a long cable, there will be signal loss and the voltage will drop: we could apply 5 10 volts on one end of the cable, but only observe (say) 49.1 volts on the other end of the cable. Alternately, electromagnetic interference from nearby devices could slightly increase the signal.*** If we use instead use the same voltages and cable length to carry a binary signal, where 0 volts == off == "0" and 5 10 volts == on == "1", a signal that had degraded from 5 10 volts to 49.1 volts would still be counted as a "1" and a 0 volt signal with some stray electromagnetic interference presenting as (say) 0.4 volts would still be counted as "0". However, we will need to use multiple bits to carry larger numbers -- either in parallel (multiple wires side-by-side), or sequentially (multiple bits presented over the same wire in sequence).
* Integers
** Integers are the basic building block of binary numbering schemes.
** The most commonly-used floating point formats are defined in the [[IEEE 754]] standard.
** IEEE754 floating point numbers have three parts: a ''sign bit'' (0 for positive, 1 for negative), a ''mantissa'' or ''significand'', and an ''exponent''. The significand has an implied 1 and radix point preceeding the stored value. The exponent is stored as an unsigned integer to which a ''bias'' value has been added; the bias value is 2<sup>(number of exponent bits - 1)</sup> - 1. The floating point value is interpreted in normal cases as <code>''sign'' mantissa * 2<sup>(exponent - bias)</sup></code>. Exponent values which are all-zeros or all-ones encode four categories of special cases: zero, infinity, Not a Number (NaN), and subnormal numbers (numbers which are close to zero, where the significand does not have an implied 1 to the left of the radix point); in these special cases, the sign bit and significand values may have special meanings.
** There are some new floating-point formats appearing, such as ''Brain Float 16'', a 16-bit format with the same dynamic range as 32-bit IEEE 754 floating point but with less accuracy, intended for use in machine learning applications.
* Characters
** Characters are encoded as integers, where each integer corresponds to one "code point" in a character table (e.g., code 65 in ASCII corresponds to the character "A").

Navigation menu