// Numbas version: exam_results_page_options {"name": "converting between bases of integers", "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": "converting between bases of integers", "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": "\n

Convert $(\\;\\var{n}\\;)_{10}$ from decimal to base $\\var{m}$ notation.

\n

$(\\;\\var{n}\\;)_{10}\\;=\\;(\\;$[[0]]$\\;)_\\var{m}$

\n

Convert $(\\;\\var{nt}\\;)_\\var{m}$ from base $\\var{m}$ to base ${10}$ notation.

\n

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

\n

 

\n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{nb}", "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": "{n1}", "marks": "5", "checkvariablenames": false, "checkingtype": "absdiff", "vsetrange": [0, 1]}], "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "gapfill"}, {"prompt": "\n

Convert $(\\var{bn})_2$ from binary to decimal notation

\n

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

\n

Convert $(\\var{dec})_{10}$ from decimal to binary notation.

\n

$(\\;\\var{dec}\\;)_{10}\\;=\\;(\\;$[[1]]$\\;)_\\var{2}$

\n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.001, "type": "jme", "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "answer": "{dn}", "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": "{bin}", "marks": "5", "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 vary with each attempt, so you may practice this as often as you like, by clicking \"Try another question like this one\".

", "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. Includes binary to decimal.

", "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/"}]}