COMP 121 Project 1
Winter 2010
Sanderson and Stucki
Due: 2 February 2010 (Groundhog Day)
Number System Converter
Implement a VB.NET application to convert integers between the decimal and binary number systems. Here are its modest requirements.
- Give the application and all its components appropriate names. Do not keep any of the default names.
- Design a graphical user interface that incorporates minimally textboxes, buttons, and labels. Feel free to add any other controls.
The layout is up to you.
- The system will be capable of converting decimal values in the range 0 to 231-1 into their binary equivalent, and vice versa.
Decimal numbers in this range will convert to binary numbers in the range 0 to 01111111111111111111111111111111 (0 followed by 31 1's).
- The application will also be capable of doing at least one of the following:
- Extend it to also convert non-negative 32-bit hexadecimal numbers into both decimal and binary, and vice versa. Hexadecimal is base 16, using
digits 0-9 and letters A-F. Each hex digit represents exactly 4 bits. A 32-bit hexadecimal value is written starting with "0x" (zero followed by x)
followed by its 8 hex digits. Example: 0x0000152E is binary 0000 0000 0001 0101 0010 1110 or decimal 10,830 (2+4+8+64+512+2048+8192)
- Extend it to handle the full 32-bit integer range of -231 to 231-1. This requires
you to review two's complement notation. You were probably introduced to this in COMP 150. If you don't have your text, you can easily
find details on the Web. The resulting binary value will always be 32 bits long and its leftmost bit will always be 1. Negative binary
values do not use the negation sign.
- For extra credit, extend it to convert 32-bit floating point values using the IEEE 754 standard format. MARS has a Tool that demonstrates this
conversion. See Dr. Pete if you are interested in doing this.
Demo the application to receive credit.