Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how about in bloodshed? Anyway, here is one for just BASIC language Write a prog

ID: 3609324 • Letter: H

Question

how about in bloodshed? Anyway, here is one for just BASIC language Write a program that prints a table of the binary, octal andhexadecimal equivalents of the decimal numbers in the range 1 -255. how about in bloodshed? Anyway, here is one for just BASIC language Write a program that prints a table of the binary, octal andhexadecimal equivalents of the decimal numbers in the range 1 -255.

Explanation / Answer

please rate - thanks CLS PRINT "decimal", "     binary", "", "octal","hex" FOR num = 1 TO 255    bin$ = ""    decimal = num    FOR i = 14 TO 0 STEP -1         pow2 = 2 ^ i                IF decimal >= pow2THEN           decimal = decimal - pow2            bin$ =bin$ + "1"         ELSE            bin$ =bin$ + "0"         END IF     NEXT i PRINT " "; num, bin$, OCT$(num), HEX$(num) NEXT num END