http://www.cs.wisc.edu/~tick/cs302/Week2.html
Program Header
Variable Declarations
Main Executable Section
STOP
END
2x^2 - 5x + 7 = yis written as
b - c a = ----- d - e
y = x^(z^2)
10 base 10 = 2^3 + 2^1 = 1010 base 2
0.1 * 10.0 does not equal 1.0 (e.g. = 0.999998)
a*2^4 + b*2^3 + c*2^2 + d*2^1 + e*2^0.so 01000001 = 1*2^6 + 1*2^0 = 65
(for example 'A' is stored as 01000001 i.e. 65)
a*2^1 + b*2^0 + c*2^(-1) + d*2^(-2),just as ab.cd in decimal is
a*10^1 + b*10^0 + c*10^(-1) + d*10^(-2)So 1.0100 = 1*2^0 + 1*2^(-2) = 1 + 1/4 = 1.25
123.8 becomes 1.238 x 10^2 in sci. notation.Moving the decimal point multiplies of divides by two. In binary, since we have only two possibilities per digit (0 or 1), moving the decimal point multiplies and divides by 2.
So 1000.1 becomes 1.0001 x 2^3(or, to write this completely in binary, 1.0001 x 10^101).
So 1.0100 is represented by only for digits...0100.
So, in complete binary this is 1.0100 x 10^0001,which converts to (1 + 1/4) x 2^1 = (1.25)*2 = 2.5
27ENTER
11 20 67ENTER
'Gareth Bestor'ENTER
READ *,......ad nauseum,B,Cand the B was on the 72nd column, rest of the line would be ignored, and you'd still have a legal statement (not reading in C may cause a problem later in the program, though). If the B was on the 71st column, however, then only the C would be ignored, and you'd have a syntax error (READ cannot end with a comma).