// Numbas version: finer_feedback_settings {"name": "Lois's copy of Binary", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": [], "name": "Lois's copy of Binary", "tags": [], "preamble": {"css": "", "js": ""}, "advice": "
Recall that when writing numbers in binary each column represents a power of two. So, in this case, reading from left to right the columns represent 27= 128; 26= 64; 25 = 32; 24 = 16; 23 = 8; 22 = 4; 21 = 2; 20= 1.
\nTo find out what the number would be in decimal we add up all the column headings which show a one.
\nSee these pages for converting a twos complement binary number to a dcimal number and vice versa. http://sandbox.mc.edu/~bennet/cs110/tc/index.html
", "rulesets": {}, "parts": [{"distractors": ["", "", "", ""], "prompt": "1100 1011
", "matrix": ["2", 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["203
", "119
", "306
", "211
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": false, "type": "1_n_2", "minMarks": 0}, {"distractors": ["", "", "", ""], "prompt": "0110 1100
", "matrix": ["2", 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["108
", "216
", "54
", "189
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": false, "type": "1_n_2", "minMarks": 0}, {"distractors": ["", "", "", ""], "prompt": "Convert the 8-bit signed (two's complement) binary number 1101 0101 into decimal
", "matrix": ["2", 0, 0, 0], "shuffleChoices": true, "variableReplacements": [], "choices": ["-43
", "-213
", "213
", "-212
"], "variableReplacementStrategy": "originalfirst", "displayType": "radiogroup", "maxMarks": 0, "scripts": {}, "marks": 0, "displayColumns": 0, "showCorrectAnswer": false, "type": "1_n_2", "minMarks": 0}], "extensions": [], "statement": "In parts (a) and (b), convert each of the unsigned binary numbers to decimal.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {}, "metadata": {"description": "Converting binary numbers to decimal; includes twos complement.
", "licence": "Creative Commons Attribution 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/"}]}