// Numbas version: finer_feedback_settings {"name": "Simon's copy of Decimal to Binary 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "tags": ["rebelmaths"], "extensions": [], "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.

", "variables": {"a": {"definition": "random(1..10000#1)", "name": "a", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}}, "statement": "

Convert the number 519 to binary.

", "type": "question", "ungrouped_variables": ["a"], "parts": [{"variableReplacements": [], "displayColumns": 0, "displayType": "radiogroup", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "scripts": {}, "minMarks": 0, "marks": 0, "distractors": ["", "", "", ""], "shuffleChoices": true, "choices": ["

0010 0000 0111

", "

0001 0010 0111

", "

0000 1110 0010

", "

1000 0110 0101

"], "showCorrectAnswer": true, "matrix": ["2", 0, 0, 0]}], "metadata": {"description": "

rebelmaths

\n

Converting a decimal number to binary.

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "variable_groups": [], "name": "Simon's copy of Decimal to Binary 1", "question_groups": [{"name": "", "pickQuestions": 0, "questions": [], "pickingStrategy": "all-ordered"}], "showQuestionGroupNames": false, "functions": {}, "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}], "resources": []}]}], "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}