The UK schools winner of the 1998 SSEM Programming Competition.
An implementation of "division by repeated subtraction".
Written by: | Brendan Campbell |
Obtained from: | The 1998 SSEM Programming Competition. |
Description: | Integer division, giving quotient and remainder. |
Parameter Lines: | 28: Dividend
29: Divisor |
Result Lines: | 30: Quotient
31: Remainder |
00: BNUM 00000000000000000000011110000000 01: BINS 10111000000000100000010001000000 02: BINS 11011000000001100000011110000000 03: BINS 00111000000000100000010001000000 04: BINS 01011000000001100000011110000000 05: BINS 01011000000000100000000000000000 06: BINS 10111000000000010000011111000000 07: BINS 00111000000001100000000010000000 08: BINS 00000000000000110000000010000000 09: BINS 10011000000000000000010010000000 10: BINS 11011000000000010000001100000000 11: BINS 11111000000001100000000000000000 12: BINS 00000000000001110000010000000000 13: BINS 01111000000000100000010000000000 14: BINS 00011000000000010000010000000000 15: BINS 01111000000001100000010000000000 16: BINS 01111000000000100000011111000000 17: BINS 01111000000001100000000000000000 18: BINS 11101000000000000000001111000000 19: BNUM 00000000000000000000010000000000 20: BNUM 00000000000000000000010000000000 21: BNUM 00000000000000000000010000000000 22: BNUM 00000000000000000000001111000000 23: BNUM 01000000000000000000000000000000 24: BNUM 10000000000000000000000000000000 25: BNUM 00110000000000000000000000000000 26: BNUM 00000000000000000000000000000000 27: BNUM 00000000000000000000000000000000 28: BNUM 01011001010000000000000000000000 29: BNUM 01010100000000000000000000000000 30: BNUM 00000000000000000000000000000000 31: BNUM 00000000000000000000000000000000