Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 5 Weeks Ago, 4 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need to code the program below in java language, and fill out the attached Algorithm template with the appropriate answers.
Write a program that reads a 4-bit binary number from the keyboard as a string and then converts it into decimal. For example, if the input is 1100, the output should be 12. (Hint: Break the string into substrings and then convert each substring to a value for a single bit. If the bits are b0, b1, b2, and b3, the decimal equivalent is 8b0+ 4b1+ 2b2+ b3.) |
Course and Section Number
Your First and Last Name ESTRELLA
MOUNTAIN
COMMUNI
TY COLLEGE CHAPTER AND ASSIGNMENT TITLE Contents
Chapter Number and Problem Number Algorithm...............................................................................................................2 Instructions: Please keep the layout the way it is. You need to Copy and paste the below table for EACH problem that
you are asked to create an algorithm for. It will reflect in the table of contents above. At the end of the assignment,
scroll up, click on Contents and then click on Update Table. i Chapter Number and Problem Number, Page Number
Problem
Description
(you may
copy the text
from the
book):
GIVEN
(Based on
your
analysis,
answer the
question: “Is
any data
given to
me?”:
INPUT (Is
the user
required to
enter data?):
LOGIC (Does
anything
need to
happen with
the given
data or the
input data?):
OUTPUT
(What needs
to be
displayed
back on the
screen?) :
ALGORITHM
:
(use MS Word
Paragraph
indent
buttons to
indent.
Hitting tab
will create a
new row in
the table) 1)
a)
2) i) a)
i) 3)
a) i) i At the end of the assignment, scroll up and click on Contents and then clic k on Update
Table.