// Numbas version: finer_feedback_settings {"name": "Lois's copy of Binary to Decimal", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8"], "name": "Lois's copy of Binary to Decimal", "tags": ["base ten", "base two", "bases", "binary", "number systems"], "preamble": {"css": "", "js": ""}, "advice": "

When writing numbers in our normal base 10 (decimal) system recall that each place in the number represents a power of 10 -- $1, 10, 10^2=100, 10^3 = 1000$ etc.

\n

In binary each place represents a power of 2. So reading from the right the places represent $1, 2, 2^2=4, 2^3 = 8, 2^4 = 16$ etc.

\n

A 1 in the place indicates that it is 'switched on' and a 0 that it is 'switched off'.

\n

For instance the binary number $1011_2$ represents $(1 \\times 8) + (1 \\times 2) + (1 \\times 1) =11_{10}$.

\n

 See http://www.purplemath.com/modules/numbbase.htm for more on binary numbers.

", "rulesets": {}, "parts": [{"allowFractions": false, "variableReplacements": [], "maxValue": "{b8}*1+{b7}*2+{b6}*4+{b5}*8+{b4}*16+{b3}*32+{b2}*64+{b1}*128", "minValue": "{b8}*1+{b7}*2+{b6}*4+{b5}*8+{b4}*16+{b3}*32+{b2}*64+{b1}*128", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": "1", "type": "numberentry", "showPrecisionHint": false}], "extensions": [], "statement": "

Convert the binary number $\\var{b1}\\var{b2}\\var{b3}\\var{b4}\\var{b5}\\var{b6}\\var{b7}\\var{b8}$ to one written in decimal (base 10).

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"b4": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b4", "description": ""}, "b5": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b5", "description": ""}, "b6": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b6", "description": ""}, "b7": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b7", "description": ""}, "b1": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b1", "description": ""}, "b2": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b2", "description": ""}, "b3": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b3", "description": ""}, "b8": {"definition": "random(0..1#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "b8", "description": ""}}, "metadata": {"description": "

Converting binary number to decimal.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}]}], "contributors": [{"name": "Lois Rollings", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/326/"}]}