Erasmus354
02-25-2004, 10:15 AM
Hi, I am new to C++ (surprise) and am currently writing a program where I need to take inputs from the user (that are supposed to be 4 bit binary) and then send that input through some boolean gates.
I know how to take an input and store it / work with it in hex. I dont know how to do the same with binary, and am having trouble trying to figure out how to know if the user input only 4 digits that are only 1s and 0s. My teacher refuses to help me, taking the "teach yourself" route, which is stupid because the text I have doesn't help, and you cant program something if you dont know how.
Any help would be greatly appreciated.
I know how to take an input and store it / work with it in hex. I dont know how to do the same with binary, and am having trouble trying to figure out how to know if the user input only 4 digits that are only 1s and 0s. My teacher refuses to help me, taking the "teach yourself" route, which is stupid because the text I have doesn't help, and you cant program something if you dont know how.
Any help would be greatly appreciated.