☰ Year plan · Communication Technology

The converter as a PHP web page

Week 7 · Unit 1 Topic 3: the number converter as a PHP web page: form, controls, PHP code and the result labels · 3 lessons
Answers are for parents and teachers.
1
The visitor types 2C and presses the hexadecimal button on the page of this week. What are the three results? Show the working.
2
The visitor types 59 and presses the decimal button. What are the binary and hexadecimal results?
3
Write the PHP test that is true only when a button named btnShow was pressed.
4
A pupil writes $dec = bindec($_POST['number']); outside every isset test. Why is this a poor place for it?
5
Which of these does the checked converter accept for the decimal button: 4096, 40 96, -12, 12345678901? Give the reason for each one that is refused.