Pep8 convert a 3-bit binary number to a decimal number
Write a program in object code that will convert a 3-bit binary number to a decimal number,For example, if input is 101, output should be 5; if input is 011, output should be 3. that is what I have to do,this is what I have so far but its not working, Can someone point out what is wrong or what need to be changed
which cpu? with objectcode alone we can't get far, however:
3 bits means that the numbers can be maximum 7
000 = 0 , 111 = 7 (add one bit more results in 4 bits numbers
adding 30h (48 decimal) to 3 bits numbers give you the ASCII result:
"0" = 30h, "001" = 31h etc
that ascii code you can use to put on screen. (if that is what you mean) much more conversion there is not, unless the 3 bit numbers must be seen as an larger octal number (base 8) but that wasn't the question.
I hope it is clear otherwise send an example of your code.
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...