Question: 2 . ( P 1 3 2 : 6 ) Write a program that reads a 4 - bit binary number from the keyboard as
P: Write a program that reads a bit binary number from the keyboard as a string and then converts it into decimal. For example, if the input is the output should be Hint: Break the string into substrings and then convert each substring to a value for a single bit. If the bits are b b b and b the decimal equivalent is bbbb
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
