2012 Old Spec

From TRCCompSci - AQA Computer Science
Revision as of 08:56, 29 November 2016 by 195.195.168.33 (talk) (Created page with " =Question 6= The algorithm, represented as a flowchart in Figure 4, and the variable table, Table 3, describe the converting of a 4-bit binary value into denary. ==Figu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Question 6

The algorithm, represented as a flowchart in Figure 4, and the variable table, Table 3, describe the converting of a 4-bit binary value into denary.


Figure 4

alt


Table 3

Identifier Data Type Purpose
Column Integer Stores the place value (column heading)
Answer Integer Stores the denary value equivalent to the bit pattern entered by the user
Bit Integer Stores a 0 or 1 entered by the user



What you need to do

  1. Write a program for the above algorithm.
  2. Test the program by showing the result of entering the values 1, 1, 0, 1 (in that order).