I am making a program that takes a binary number (a boolean array) and gives numerous representations.
For example, Enter binary (8 bits): 10001000
-Unsigned int: 136
-Hexadecimal: 88
-Octal: 210
-Two's complement: -120
-Sign magnitude: -8
-One's complement: -119
-Excess-127: 9
-ASCII: N/A
-Pep/8: SUBX immediate
-Floating-point: -0.125
I currently have all of the representations working, except floating-point. FP format would be 1 sign bit, 3 bit exponent (excess-3), and 4 bit significand. Does anyone have any suggestions on how to go about doing this? Thanks.