// Numbas version: exam_results_page_options {"name": "integers in various bases", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"nbase": {"definition": "[random(1..n-1)]+repeat(random(0..n-1),le-1)", "type": "list", "parameters": [["n", "number"], ["le", "number"]], "language": "jme"}, "ord": {"definition": "if(mod(m^p,n)=1,p,ord(m,n,p+1))", "type": "number", "parameters": [["m", "number"], ["n", "number"], ["p", "number"]], "language": "jme"}, "conv": {"definition": "sum(map(r^(length(a)-x-1)*a[x],x,0..length(a)-1))", "type": "number", "parameters": [["a", "list"], ["r", "number"]], "language": "jme"}, "chkord": {"definition": "if(gcd(m,n)=1,ord(m,n,1),0)", "type": "number", "parameters": [["m", "number"], ["n", "number"]], "language": "jme"}}, "ungrouped_variables": ["dn", "ar1", "ld", "ar3", "ar4", "lc", "nb", "m", "ar2", "n", "bin", "n1", "dec", "nt", "bn"], "name": "integers in various bases", "tags": [], "advice": "

You might find these articles on different number bases useful: https://nrich.maths.org/1368  http://www.advanced-ict.info/mathematics/bases.html

", "rulesets": {}, "parts": [{"prompt": "

Find the representations of $(2008)_{10}$ in base $2$, base $3$, and base $11$.

\n

Fill in your answer without spaces between the digits, for example $(5)_{10}=(101)_2$.

\n

$(2008)_{10}\\;=\\;($[[0]]$)_{2}$

\n

$(2008)_{10}\\;=\\;($[[1]]$)_{3}$

\n

 $(2008)_{10}\\;=\\;($[[2]]$)_{11}$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "11111011000", "marks": "5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "2202101", "marks": "5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "1566", "marks": "5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

Find the decimal notation (i.e. the base $10$ representation) for $(100011)_2$ and $(100011)_3$.

\n

$(100011)_{2}\\;=\\;($[[0]]$)_{10}$

\n

$(100011)_{3}\\;=\\;($[[1]]$)_{10}$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "35", "marks": "5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "247", "marks": "5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "

For any integer $m\\ge 2$, what is $1$ in base $m$?

\n

$1\\;=\\;($[[0]]$)_{m}$

\n

What is $m$ in base $m$?

\n

$m\\;=\\;($[[1]]$)_{m}$

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "1", "marks": "2", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}, {"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "10", "marks": "3", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}], "extensions": ["stats"], "statement": "

This question is about converting integers from one base to another.

\n

The numbers in this question are fixed.

", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"dn": {"definition": "conv(ar3,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "dn", "description": ""}, "ar1": {"definition": "nbase(m,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "ar1", "description": ""}, "ld": {"definition": "random(7..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "ld", "description": ""}, "ar3": {"definition": "nbase(2,ld)", "templateType": "anything", "group": "Ungrouped variables", "name": "ar3", "description": ""}, "ar4": {"definition": "nbase(2,lc)", "templateType": "anything", "group": "Ungrouped variables", "name": "ar4", "description": ""}, "lc": {"definition": "random(7..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "lc", "description": ""}, "nb": {"definition": "conv(ar1,10)", "templateType": "anything", "group": "Ungrouped variables", "name": "nb", "description": ""}, "m": {"definition": "random(5..9)", "templateType": "anything", "group": "Ungrouped variables", "name": "m", "description": ""}, "ar2": {"definition": "nbase(m,4)", "templateType": "anything", "group": "Ungrouped variables", "name": "ar2", "description": ""}, "n": {"definition": "conv(ar1,m)", "templateType": "anything", "group": "Ungrouped variables", "name": "n", "description": ""}, "bin": {"definition": "conv(ar4,10)", "templateType": "anything", "group": "Ungrouped variables", "name": "bin", "description": ""}, "n1": {"definition": "conv(ar2,m)", "templateType": "anything", "group": "Ungrouped variables", "name": "n1", "description": ""}, "dec": {"definition": "conv(ar4,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "dec", "description": ""}, "nt": {"definition": "conv(ar2,10)", "templateType": "anything", "group": "Ungrouped variables", "name": "nt", "description": ""}, "bn": {"definition": "conv(ar3,10)", "templateType": "anything", "group": "Ungrouped variables", "name": "bn", "description": ""}}, "metadata": {"description": "

Converting integers from one base to another. The numbers are non-variable.

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