// Numbas version: finer_feedback_settings {"name": "Decimal to Binary 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a"], "name": "Decimal to Binary 1", "tags": ["rebelmaths"], "advice": "

Repeatedly divide the given decimal number by 2, writing the remainder clearly on the right hand side (even if the remainder is 0).

\n

Continue until you eventually reach 1, at which point you get 1/2 = 0, with remainder 1. Now list the remainders in the order from bottom to top.

\n

\n

For example, to convert 363 to decimal:

\n

            Number of times 2 goes in:                     Remainder:

\n

363/2 = 181                                                        1

\n

181/2 = 90                                                          1

\n

90/2   = 45                                                          0

\n

45/2   = 22                                                          1

\n

22/2   = 11                                                          0

\n

11/2   = 5                                                            1

\n

5/2     = 2                                                            1

\n

2/2     = 1                                                            0

\n

1/2     = 0                                                            1

\n

\n

We can go no further, so we stop. Now, listing the remainders in order from bottom to top, we get that 363, in binary, is 101101011.

", "rulesets": {}, "parts": [{"matrix": ["2", 0, 0, 0], "shuffleChoices": true, "marks": 0, "variableReplacements": [], "choices": ["

0010 0000 0111

", "

0001 0010 0111

", "

0000 1110 0010

", "

1000 0110 0101

"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "distractors": ["", "", "", ""], "displayColumns": 0, "showCorrectAnswer": true, "type": "1_n_2", "minMarks": 0}], "extensions": [], "statement": "

Convert the number 519 to binary.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(1..10000#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "a", "description": ""}}, "metadata": {"description": "

rebelmaths

\n

Converting a decimal number to binary.

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