States of the Pascal Floating Point number processor Bad START Initial state Bad InWhole Reading digits before the decimal point 109 Bad PastDot Just read decimal point after digits 109. Good InFrac Reading digits after the decimal point 109.255 Bad PastE Just read E 109e or 109.255e Bad PastSign Just read sign 109e+ or 109.255e- Good InExp Reading exponent 109e+5 or 109.255e-5 Bad TRAP Unrecoverable .03e15 or ECECSCI Possible inputs Digit Digit (0 to 9) Point Decimal point (.) E E or e Sign + or - Other Anything else State table present next state input state --------------------------------- START Digit -> InWhole InWhole Digit -> InWhole InWhole Point -> PastDot InWhole E -> PastE PastDot Digit -> InFrac InFrac E -> PastE InFrac Digit -> InExp InFrac Sign -> PastSign PastSign Digit -> InExp InExp Digit -> InExp otherwise -> TRAP Input encoding Digit 000 Point 001 E 010 Sign 011 Other 100 State encoding START 000 InWhole 001 PastDot 010 InFrac 011 PastE 100 PastSign 101 InExp 110 TRAP 111 Binary next state function pres | next state input | state ---------------+------ 000 000 | 001 000 001 | 111 000 010 | 111 000 011 | 111 000 100 | 111 001 000 | 001 001 001 | 010 001 010 | 100 001 011 | 111 001 100 | 111 010 000 | 011 010 001 | 111 010 010 | 111 010 011 | 111 010 100 | 111 011 000 | 011 011 001 | 111 011 010 | 100 011 011 | 111 011 100 | 111 100 000 | 110 100 001 | 111 100 010 | 111 100 011 | 101 100 100 | 111 101 000 | 110 101 001 | 111 101 010 | 111 101 011 | 111 101 100 | 111 110 000 | 110 110 001 | 111 110 010 | 111 110 011 | 111 110 100 | 111 111 000 | 111 111 001 | 111 111 010 | 111 111 011 | 111 111 100 | 111 Binary Output function state | output ---------+------- 000 | 0 001 | 0 010 | 0 011 | 1 100 | 0 101 | 0 110 | 1 111 | 0