Question: ***JavaScript*** Use for loops to print out a copy of this hex to binary conversion table: Decimal Hex Binary 0 0 0000 1 1 0001
***JavaScript*** 

Use "for" loops to print out a copy of this hex to binary conversion table: Decimal Hex Binary 0 0 0000 1 1 0001 N 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0110 7 7 0111 8 00 8 1000 9 9 1001 10 A 1010 11 B 1011 12 Ic 1100 13 D 1101 14 E 1110 15 F 1111 Challenge Problem: Make this into a programming calculator in which the user can enter a decimal number and then choose "hex" or "binary" as output. Analysis: The scripts are getting more complicated! To accomplish a complex task such as this one, you need to break down the job into simple pieces. Here is some pseuodcode showing different elements of the task: 1. Create a chart with the right number of rows and columns. 2. Put headings into the top row. 3. Declare a variable to count from 0 to 15. 4. Create a function to convert decimal numbers to hexadecimal numbers. 5. Create a function to convert decimal numbers to binary numbers. 6. Create each row of the chart by inserting the count, the count converted to hex, and the count converted to binary. A good approach is to code each of the steps in the pseudocode as an independent script. Once you get all these things to work on their own, then you need to create the final solution by moving all the individual elements into the same script. Some code samples below show various approaches coding each of the script elements
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
