[{"data":1,"prerenderedAt":640},["ShallowReactive",2],{"i-kinnu:logo":3,"i-kinnu:origami-folding":8,"tile-technology-how-computers-work-how-computers-represent-and-process-data":12,"i-lucide:chevron-right":635,"i-lucide:menu":638},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,27,false,"\u003Cg fill=\"none\">\u003Cpath d=\"M0.046875 1.05555C0.046875 1.03541 0.048197 1.01579 0.0507438 0.996728C0.0987149 0.438619 0.586845 0 1.18194 0H25.4398C26.451 0 26.9575 1.171 26.2424 1.85585L15.7301 11.9243L1.31574 0.903476C1.17475 0.79568 1.01137 0.761884 0.859586 0.784111L26.2936 25.1441C27.0086 25.829 26.5022 27 25.4909 27H1.18194C0.555061 27 0.046875 26.5133 0.046875 25.9129V1.05555Z\" fill=\"currentColor\"/>\u003C/g>",{"left":4,"top":4,"width":9,"height":10,"rotate":4,"vFlip":6,"hFlip":6,"body":11},1000,236,"\u003Cg fill=\"none\">\u003Cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n    d=\"M193.68 38.2238C195.994 38.2238 197.87 40.0989 197.87 42.412V231.812C197.87 234.125 195.994 236 193.68 236H4.19013C1.87603 236 2.02305e-07 234.125 0 231.812V42.412C-2.02305e-07 40.0989 1.87603 38.2238 4.19013 38.2238H193.68ZM111.76 89.0072C111.685 87.9474 110.572 87.2905 109.608 87.7376L96.8872 93.641C95.7786 94.1554 95.702 95.7016 96.7545 96.3225L101.579 99.167C94.7045 109.365 90.5733 122.892 90.5732 137.642C90.5733 154.323 95.8569 169.439 104.416 179.945C105.301 181.032 106.9 181.196 107.987 180.311C109.075 179.426 109.238 177.828 108.353 176.741C100.621 167.25 95.6522 153.305 95.6521 137.642C95.6522 123.661 99.6138 111.051 105.963 101.754L110.456 104.403C111.508 105.024 112.826 104.21 112.74 102.991L111.76 89.0072ZM9.63194 136.286C9.14864 136.286 8.75684 136.678 8.75684 137.161C8.7569 137.644 9.14868 138.035 9.63194 138.035H17.2161C17.6993 138.035 18.0912 137.644 18.0912 137.161C18.0912 136.678 17.6994 136.286 17.2161 136.286H9.63194ZM22.6813 136.286C22.198 136.286 21.8062 136.678 21.8062 137.161C21.8063 137.644 22.1981 138.035 22.6813 138.035H30.2655C30.7487 138.035 31.1406 137.644 31.1406 137.161C31.1406 136.678 30.7488 136.286 30.2655 136.286H22.6813ZM35.7464 136.286C35.2631 136.286 34.8713 136.678 34.8713 137.161C34.8713 137.644 35.2631 138.035 35.7464 138.035H44.4973C44.9805 138.035 45.3724 137.644 45.3724 137.161C45.3724 136.678 44.9806 136.286 44.4973 136.286H35.7464ZM49.9977 136.286C49.5144 136.286 49.1226 136.678 49.1226 137.161C49.1226 137.644 49.5144 138.035 49.9977 138.035H57.5819C58.0651 138.035 58.4569 137.644 58.457 137.161C58.457 136.678 58.0651 136.286 57.5819 136.286H49.9977ZM63.0783 136.286C62.595 136.286 62.2032 136.678 62.2032 137.161C62.2033 137.644 62.5951 138.035 63.0783 138.035H70.6625C71.1457 138.035 71.5375 137.644 71.5376 137.161C71.5376 136.678 71.1457 136.286 70.6625 136.286H63.0783ZM76.1277 136.286C75.6444 136.286 75.2526 136.678 75.2526 137.161C75.2527 137.644 75.6445 138.035 76.1277 138.035H83.7119C84.1951 138.035 84.5869 137.644 84.587 137.161C84.587 136.678 84.1951 136.286 83.7119 136.286H76.1277ZM102.266 136.286C101.782 136.286 101.39 136.678 101.39 137.161C101.391 137.644 101.782 138.035 102.266 138.035H109.85C110.333 138.035 110.725 137.644 110.725 137.161C110.725 136.678 110.333 136.286 109.85 136.286H102.266ZM115.338 136.286C114.855 136.286 114.463 136.678 114.463 137.161C114.463 137.644 114.855 138.035 115.338 138.035H122.923C123.406 138.035 123.798 137.644 123.798 137.161C123.798 136.678 123.406 136.286 122.923 136.286H115.338ZM128.403 136.286C127.92 136.286 127.528 136.678 127.528 137.161C127.528 137.644 127.92 138.035 128.403 138.035H135.988C136.471 138.035 136.863 137.644 136.863 137.161C136.863 136.678 136.471 136.286 135.988 136.286H128.403ZM141.468 136.286C140.985 136.286 140.593 136.678 140.593 137.161C140.593 137.644 140.985 138.035 141.468 138.035H149.053C149.536 138.035 149.928 137.644 149.928 137.161C149.928 136.678 149.536 136.286 149.053 136.286H141.468ZM154.541 136.286C154.058 136.286 153.666 136.678 153.666 137.161C153.666 137.644 154.058 138.035 154.541 138.035H162.125C162.609 138.035 163 137.644 163.001 137.161C163.001 136.678 162.609 136.286 162.125 136.286H154.541ZM167.614 136.286C167.131 136.286 166.739 136.678 166.739 137.161C166.739 137.644 167.131 138.035 167.614 138.035H175.198C175.681 138.035 176.073 137.644 176.073 137.161C176.073 136.678 175.681 136.286 175.198 136.286H167.614ZM180.671 136.286C180.188 136.286 179.796 136.678 179.796 137.161C179.796 137.644 180.188 138.035 180.671 138.035H188.255C188.739 138.035 189.13 137.644 189.131 137.161C189.131 136.678 188.739 136.286 188.255 136.286H180.671Z\"\n    fill=\"currentColor\" />\n  \u003Cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n    d=\"M444.85 38.2277C447.164 38.2277 449.04 40.1028 449.04 42.4159V132.928C449.04 135.241 447.164 137.116 444.85 137.116H255.36C253.046 137.116 251.17 135.241 251.17 132.928V42.4159C251.17 40.1028 253.046 38.2277 255.36 38.2277H444.85ZM361.96 125.388C361.618 125.046 361.064 125.046 360.722 125.388L354.534 131.572C354.192 131.914 354.192 132.468 354.534 132.81C354.876 133.151 355.43 133.151 355.772 132.81L361.96 126.624C362.301 126.283 362.301 125.73 361.96 125.388ZM371.047 116.311C370.705 115.969 370.15 115.969 369.809 116.311L364.446 121.671C364.104 122.012 364.104 122.567 364.446 122.908C364.788 123.249 365.342 123.25 365.684 122.908L371.047 117.548C371.388 117.207 371.388 116.652 371.047 116.311ZM380.124 107.246C379.782 106.904 379.227 106.904 378.885 107.246L373.523 112.606C373.181 112.948 373.181 113.502 373.523 113.844C373.864 114.185 374.419 114.185 374.761 113.844L380.124 108.483C380.465 108.142 380.465 107.587 380.124 107.246ZM385.736 65.8841C385.891 64.6727 384.622 63.7845 383.536 64.3434L371.069 70.7636C370.124 71.2504 369.96 72.5334 370.752 73.2424L381.2 82.5938C382.11 83.4081 383.561 82.8672 383.717 81.6557L384.393 76.3725C391.143 77.1933 398.567 80.7709 404.771 86.9711C411.124 93.3213 414.726 100.952 415.43 107.827C415.573 109.221 416.819 110.236 418.214 110.093C419.609 109.95 420.624 108.703 420.481 107.309C419.644 99.1317 415.435 90.4514 408.362 83.3817C401.466 76.489 393.038 72.3185 385.038 71.338L385.736 65.8841ZM389.2 98.1733C388.859 97.8319 388.304 97.8318 387.962 98.1733L382.6 103.534C382.258 103.875 382.258 104.429 382.6 104.771C382.941 105.112 383.496 105.112 383.838 104.771L389.2 99.4108C389.542 99.0693 389.542 98.5149 389.2 98.1733ZM398.262 89.1047C397.92 88.7633 397.365 88.7632 397.024 89.1047L391.661 94.4649C391.319 94.8065 391.319 95.3608 391.661 95.7024C392.002 96.0436 392.557 96.0438 392.899 95.7024L398.262 90.3421C398.603 90.0007 398.603 89.4463 398.262 89.1047ZM416.431 70.9616C416.089 70.6202 415.534 70.6201 415.193 70.9616L409.83 76.3218C409.488 76.6634 409.488 77.2177 409.83 77.5592C410.172 77.9005 410.726 77.9007 411.068 77.5592L416.431 72.199C416.772 71.8575 416.772 71.3032 416.431 70.9616ZM425.508 61.891C425.166 61.5496 424.611 61.5495 424.27 61.891L418.907 67.2512C418.565 67.5928 418.565 68.1471 418.907 68.4887C419.249 68.8299 419.803 68.8301 420.145 68.4887L425.508 63.1284C425.849 62.787 425.849 62.2326 425.508 61.891ZM434.569 52.8146C434.227 52.4731 433.673 52.4731 433.331 52.8146L427.968 58.1748C427.626 58.5163 427.627 59.0706 427.968 59.4122C428.31 59.7534 428.864 59.7537 429.206 59.4122L434.569 54.052C434.91 53.7105 434.91 53.1562 434.569 52.8146ZM443.638 43.7479C443.296 43.4065 442.742 43.4064 442.4 43.7479L437.037 49.1081C436.695 49.4496 436.696 50.004 437.037 50.3455C437.379 50.6868 437.933 50.687 438.275 50.3455L443.638 44.9853C443.98 44.6438 443.979 44.0895 443.638 43.7479Z\"\n    fill=\"currentColor\" />\n  \u003Cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n    d=\"M684.066 38.2277C687.798 38.2281 689.667 42.7391 687.027 45.3773L596.473 135.889C595.687 136.675 594.621 137.116 593.51 137.116H506.335C504.021 137.116 502.145 135.241 502.145 132.928V42.4159C502.145 40.1028 504.021 38.2277 506.335 38.2277H684.066ZM514.603 124.566C514.261 124.224 513.707 124.224 513.365 124.566L507.178 130.751C506.836 131.093 506.836 131.646 507.178 131.988C507.519 132.329 508.073 132.329 508.415 131.988L514.603 125.803C514.945 125.462 514.945 124.908 514.603 124.566ZM523.689 115.491C523.348 115.15 522.794 115.15 522.452 115.491L517.09 120.852C516.748 121.193 516.748 121.747 517.09 122.088C517.431 122.43 517.985 122.43 518.327 122.088L523.689 116.728C524.031 116.386 524.031 115.833 523.689 115.491ZM532.102 65.8295C530.707 65.6872 529.46 66.7017 529.318 68.0957C529.175 69.4896 530.189 70.7355 531.584 70.8787C538.463 71.5825 546.096 75.1826 552.45 81.5329C558.723 87.8037 562.312 95.3226 563.079 102.13L557.738 102.392C556.518 102.452 555.865 103.855 556.607 104.827L565.115 115.969C565.76 116.814 567.051 116.751 567.611 115.847L574.992 103.928C575.635 102.889 574.848 101.555 573.628 101.615L568.161 101.882C568.161 101.878 568.162 101.874 568.161 101.871C567.324 93.6931 563.114 85.0124 556.041 77.9425C548.968 70.873 540.283 66.6668 532.102 65.8295ZM532.766 106.421C532.425 106.079 531.871 106.079 531.529 106.421L526.166 111.781C525.825 112.123 525.825 112.676 526.166 113.018C526.508 113.359 527.062 113.359 527.403 113.018L532.766 107.657C533.108 107.316 533.108 106.762 532.766 106.421ZM541.843 97.3445C541.501 97.003 540.948 97.003 540.606 97.3445L535.243 102.705C534.901 103.046 534.902 103.6 535.243 103.941C535.585 104.283 536.139 104.283 536.48 103.941L541.843 98.5809C542.185 98.2393 542.185 97.686 541.843 97.3445ZM550.92 88.2778C550.578 87.9363 550.025 87.9363 549.683 88.2778L544.32 93.638C543.978 93.9796 543.978 94.5329 544.32 94.8745C544.662 95.2161 545.215 95.2161 545.557 94.8745L550.92 89.5142C551.262 89.1727 551.262 88.6193 550.92 88.2778ZM569.066 70.1405C568.724 69.799 568.17 69.7991 567.829 70.1405L562.466 75.5008C562.124 75.8423 562.124 76.3956 562.466 76.7372C562.808 77.0788 563.361 77.0788 563.703 76.7372L569.066 71.377C569.407 71.0354 569.407 70.4821 569.066 70.1405ZM578.143 61.0699C577.801 60.7284 577.247 60.7285 576.906 61.0699L571.543 66.4302C571.201 66.7717 571.201 67.3251 571.543 67.6666C571.885 68.0082 572.438 68.0082 572.78 67.6666L578.143 62.3064C578.484 61.9648 578.484 61.4115 578.143 61.0699ZM587.219 51.9896C586.878 51.6481 586.324 51.6481 585.982 51.9896L580.62 57.3498C580.278 57.6914 580.278 58.2447 580.62 58.5863C580.961 58.9279 581.515 58.9279 581.857 58.5863L587.219 53.2261C587.561 52.8845 587.561 52.3312 587.219 51.9896ZM596.288 42.9249C595.947 42.5833 595.392 42.5833 595.05 42.9249L589.689 48.2851C589.347 48.6267 589.347 49.18 589.689 49.5216C590.03 49.863 590.584 49.8631 590.926 49.5216L596.288 44.1613C596.63 43.8198 596.63 43.2664 596.288 42.9249Z\"\n    fill=\"currentColor\" />\n  \u003Cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n    d=\"M850.814 38.2277C854.547 38.2281 856.416 42.739 853.777 45.3773L763.223 135.889C762.437 136.674 761.371 137.116 760.26 137.116H673.176C669.443 137.116 667.574 132.605 670.213 129.966L760.768 39.4544C761.554 38.6692 762.62 38.2277 763.731 38.2277H850.814ZM761.338 121.8C760.855 121.8 760.463 122.191 760.463 122.674V131.13H762.213V122.674C762.213 122.191 761.821 121.8 761.338 121.8ZM761.338 108.971C760.855 108.971 760.463 109.363 760.463 109.846V118.301H762.213V109.846C762.213 109.363 761.821 108.971 761.338 108.971ZM761.338 96.1402C760.855 96.1406 760.463 96.5321 760.463 97.0149V105.47H762.213V97.0149C762.213 96.532 761.821 96.1404 761.338 96.1402ZM782.263 71.887C781.043 71.951 780.395 73.3571 781.139 74.3257L784.474 78.6631C779.115 82.951 771.242 85.7443 762.35 85.7444C753.366 85.7442 745.421 82.8944 740.059 78.5305C738.972 77.6461 737.373 77.8099 736.488 78.8961C735.602 79.983 735.766 81.582 736.853 82.467C743.231 87.6574 752.348 90.8207 762.35 90.8209C772.209 90.8208 781.205 87.746 787.568 82.6884L790.833 86.9341C791.577 87.9025 793.103 87.6391 793.479 86.4767L797.791 73.138C798.118 72.127 797.33 71.1017 796.268 71.1566L782.263 71.887ZM761.338 70.4847C760.855 70.4851 760.463 70.8767 760.463 71.3594V79.8147H762.213V71.3594C762.213 70.8766 761.821 70.485 761.338 70.4847ZM761.338 57.656C760.855 57.6564 760.463 58.048 760.463 58.5307V66.986H762.213V58.5307C762.213 58.0479 761.821 57.6563 761.338 57.656ZM761.338 44.8293C760.855 44.8297 760.463 45.2212 760.463 45.704V54.1592H762.213V45.704C762.213 45.2211 761.821 44.8295 761.338 44.8293Z\"\n    fill=\"currentColor\" />\n  \u003Cpath\n    d=\"M995.759 38.2277C999.53 38.228 1001.42 42.5171 998.752 45.0253L959.55 81.9005L905.796 41.5363C905.271 41.1418 904.662 41.0182 904.096 41.0994L997.485 130.319C1000.15 132.828 998.262 137.116 994.491 137.116H905.298C902.96 137.116 901.065 135.333 901.065 133.134V42.0941C901.065 42.0204 901.07 41.9483 901.079 41.8786C901.258 39.8345 903.079 38.2277 905.298 38.2277H995.759Z\"\n    fill=\"currentColor\" />\n  \u003Cpath\n    d=\"M505.873 0C506.657 4.57042e-05 507.307 0.195499 507.823 0.587023C508.338 0.969046 508.596 1.53802 508.596 2.29251C508.596 2.76034 508.467 3.19015 508.209 3.58162C507.951 3.96344 507.497 4.26401 506.848 4.48361V4.54114C507.65 4.67487 508.205 4.96191 508.51 5.4012C508.816 5.83087 508.969 6.31772 508.969 6.86193C508.969 7.74056 508.672 8.41851 508.08 8.89604C507.497 9.38304 506.733 9.62731 505.787 9.62738C504.861 9.62738 504.158 9.42172 503.68 9.0111C503.212 8.60054 502.935 8.08005 502.849 7.44993L503.881 7.10571L503.924 7.24028C504.035 7.54934 504.211 7.82925 504.454 8.07986C504.731 8.36635 505.166 8.50986 505.758 8.50989C506.465 8.50989 506.943 8.32772 507.191 7.9648C507.449 7.6019 507.579 7.20078 507.579 6.7615C507.579 6.2173 507.378 5.80683 506.977 5.52992C506.585 5.25295 505.93 5.10026 505.013 5.07161V4.15402C505.901 4.12537 506.489 3.92484 506.776 3.55237C507.062 3.18009 507.206 2.82242 507.206 2.47876C507.206 1.62801 506.752 1.17539 505.845 1.12237L505.658 1.11749C505.467 1.11752 505.242 1.14605 504.985 1.2033C504.736 1.25105 504.511 1.3274 504.31 1.43245L504.081 2.56457L503.05 2.44951L503.322 0.687461C503.666 0.49653 504.068 0.33454 504.526 0.200875C504.985 0.0671945 505.434 0 505.873 0Z\"\n    fill=\"currentColor\" />\n  \u003Cpath\n    d=\"M905.727 2.30616L904.638 2.4066L904.466 1.26083H901.428V3.72497C901.533 3.71544 901.643 3.71034 901.757 3.71034H902.086C902.755 3.71034 903.386 3.78668 903.979 3.93949C904.58 4.09229 905.068 4.38363 905.44 4.8132C905.822 5.23335 906.014 5.84949 906.014 6.66106C906.014 7.64468 905.722 8.38068 905.14 8.86776C904.557 9.36434 903.783 9.6127 902.818 9.61275C901.91 9.61275 901.213 9.40711 900.725 8.99648C900.248 8.59544 899.96 8.08007 899.865 7.44993L900.911 7.10571C901.007 7.49723 901.203 7.8271 901.499 8.09449C901.795 8.37131 902.211 8.50985 902.746 8.50989C903.395 8.50989 903.869 8.33787 904.165 7.99405C904.461 7.65981 904.609 7.22507 904.609 6.69031C904.609 5.87861 904.337 5.3625 903.792 5.14279C903.248 4.91361 902.612 4.79958 901.886 4.79955C901.695 4.79955 901.489 4.80365 901.27 4.8132C901.059 4.82275 900.854 4.83701 900.653 4.85611L900.224 4.44071V0.143343H905.569L905.727 2.30616Z\"\n    fill=\"currentColor\" />\n  \u003Cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n    d=\"M765.49 6.04576H766.966L766.837 7.14862H765.49V9.48404H764.185V7.14862H759.857L759.713 6.04576L762.909 0.143343H765.49V6.04576ZM760.96 6.04576H764.185V1.26083H763.541L760.96 6.04576Z\"\n    fill=\"currentColor\" />\n  \u003Cpath d=\"M4.80573 6.47481H6.41154V7.60693H1.81068V6.47481H3.50235V1.27546H1.81068V0.143343H4.80573V6.47481Z\"\n    fill=\"currentColor\" />\n  \u003Cpath\n    d=\"M254.359 0C255.353 0 256.055 0.239186 256.466 0.716715C256.877 1.18447 257.083 1.68072 257.083 2.20573C257.083 2.85516 256.849 3.44346 256.38 3.96875C255.912 4.49397 255.348 4.96638 254.689 5.38657C254.039 5.79717 253.437 6.15968 252.883 6.47481H256.423L256.538 5.42948L257.599 5.51529L257.426 7.60693H251.407L251.292 6.58987C252.582 5.73032 253.638 4.98523 254.46 4.35489C255.281 3.71509 255.693 3.05632 255.693 2.37832C255.693 1.53787 255.166 1.11749 254.115 1.12237L254.115 1.11749C253.924 1.11754 253.695 1.14604 253.427 1.2033C253.16 1.25104 252.916 1.32238 252.697 1.41783L252.467 2.47876L251.45 2.3637L251.707 0.60165C252.118 0.401088 252.563 0.253475 253.041 0.15797C253.519 0.0529708 253.958 1.99446e-05 254.359 0Z\"\n    fill=\"currentColor\" />\u003C/g>",{"tile":13,"orbsWithOnlyMarkdownPages":308},{"id":14,"data":15,"type":16,"maxContentLevel":19,"version":20,"orbs":21},"f6730077-c656-431b-9b99-6fbdab96d0cb",{"type":16,"title":17,"tagline":18},9,"How Computers Represent and Process Data","How the binary system and higher-level languages allow us to interact with computers",3,4,[22,106,231],{"id":23,"data":24,"type":25,"version":20,"maxContentLevel":19,"summaryPage":27,"introPage":36,"pages":44},"1bfe654c-34af-465e-90be-7d0a0d20e0c6",{"type":25,"title":26},2,"Bits, bytes, and the binary system",{"id":28,"data":29,"type":19,"maxContentLevel":19,"version":35},"61341145-8dad-41d5-8198-a6a5f7fb3496",{"type":19,"title":30,"summary":31},"",[32,33,34],"Bits are individual 1s and 0s","Bytes are combinations of 8 bits, which can be used to represent data","Booleans are a data type that can either be 'True' or 'False'",1,{"id":37,"data":38,"type":39,"maxContentLevel":19,"version":35},"536cb2b4-ece2-4bd5-b6f7-742949722fd4",{"type":39,"title":30,"intro":40},10,[41,42,43],"What bits and bytes are","How binary represents numbers and text","How Booleans are used for computer logic",[45,74,89],{"id":46,"data":47,"type":35,"maxContentLevel":19,"version":25,"reviews":50},"00db76b8-cae6-4b69-b4af-85205a426975",{"type":35,"contentRole":25,"markdownContent":48,"audioMediaId":49},"At the heart of every computer lies the binary system, a method of representing data using only two states: 0 and 1. These states are known as bits, short for binary digits. A bit is the smallest unit of data in a computer and can represent one of two values, typically interpreted as off (0) or on (1).\n\n![Graph](image://d0d20b6c-f084-499f-8a5e-84b097e4750f \"Binary number table by Elaz85 (CC BY-SA 4.0) \u003Chttps://creativecommons.org/licenses/by-sa/4.0>, via Wikimedia Commons\")\n\nWe’ve already discussed the hardware components that allow these values to be represented in the computer. Now we’re going to look into more detail about the kinds of data that can be represented and operations that can be performed using these methods.\n\nA group of eight bits forms a byte, which is a fundamental unit of data storage in computing. With eight bits, a byte can represent 256 different values, ranging from 0 to 255. For example, the number 1 would be 00000001, and the number 201 would be 11001001. Bytes are the building blocks for representing various types of data, including characters, numbers, and more complex structures.","d833239e-9759-4416-923d-60be5cca6e82",[51,63],{"id":52,"data":53,"type":54,"version":35,"maxContentLevel":19},"2a4f8982-1f63-47ea-88f1-6bbd53a8acae",{"type":54,"reviewType":19,"spacingBehaviour":35,"multiChoiceQuestion":55,"multiChoiceCorrect":57,"multiChoiceIncorrect":59,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6},11,[56],"How many different values can a bit represent?",[58],"2",[60,61,62],"1","0","3",{"id":64,"data":65,"type":54,"version":25,"maxContentLevel":19},"48fc8921-31ac-4484-8b40-bb37afb39bca",{"type":54,"reviewType":19,"spacingBehaviour":35,"multiChoiceQuestion":66,"multiChoiceCorrect":68,"multiChoiceIncorrect":70,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6},[67],"How many bits are there in the binary number 0000001011011110?",[69],"16",[71,72,73],"8","4","32",{"id":75,"data":76,"type":35,"maxContentLevel":19,"version":19,"reviews":79},"55f8394c-c28b-4b67-bd0f-68e5344ad317",{"type":35,"contentRole":25,"markdownContent":77,"audioMediaId":78},"To understand how computers use the binary system to represent data, consider the example of a simple number. In the decimal system, the number 5 is represented as '5'. In binary, the same number is represented as '101'. Each position in a binary number represents a power of 2, starting from the rightmost digit.\n\nFor instance, the binary number '101' can be broken down as follows: the rightmost digit (1) represents 2⁰ (equal to 1), the middle digit (0) represents 2¹ (equal to 2), and the leftmost digit (1) represents 2² (equal to 4). Adding these values together (1 \\* 2² + 0 \\* 2¹ + 1 \\* 2⁰) gives us the decimal number 5.\n\nBinary representation is not limited to numbers. It is also used to encode characters, images, and other types of data. For example, the letter 'A' is represented in binary as '01000001'. This encoding is part of a standardized system known as ASCII (American Standard Code for Information Interchange), which assigns a unique binary value to each character. By converting characters into binary, computers can store and manipulate text efficiently.\n\n![Graph](image://0a66654a-d9d6-4cb6-8604-28004b21ddc1 \"Table of ASCII characters. Image: ASCII-Table.svg: ZZT32derivative work: Usha, Public domain, via Wikimedia Commons\")","28c084c5-348f-4003-b073-c2e59eaec98a",[80],{"id":81,"data":82,"type":54,"version":35,"maxContentLevel":19},"b1a17518-41f0-44a0-8764-26e4efb6aff7",{"type":54,"reviewType":25,"spacingBehaviour":35,"binaryQuestion":83,"binaryCorrect":85,"binaryIncorrect":87},[84],"What number is represented by the rightmost digit in a binary number?",[86],"2⁰",[88],"2¹",{"id":90,"data":91,"type":35,"maxContentLevel":19,"version":35,"reviews":94},"c3d9e769-1033-4a56-9ae3-946b93374886",{"type":35,"contentRole":25,"markdownContent":92,"audioMediaId":93},"In addition to representing data, the binary system is crucial for data processing. Computers use binary arithmetic to perform calculations, logical operations, and data manipulation. Binary arithmetic involves operations such as addition, subtraction, multiplication, and division, all performed using binary numbers. These operations are carried out by the computer's central processing unit (CPU), which is designed to handle binary data at high speeds.\n\nLogical operations, such as AND, OR, and NOT, are also performed using binary values. These operations are fundamental to decision-making processes in computer programs. For example, an AND operation takes two binary inputs and produces a result of 1 only if both inputs are 1. Otherwise, the result is 0. As we’ve previously discussed, these logical operations enable computers to execute complex algorithms and make decisions based on binary data.\n\n![Graph](image://8089a46e-e38a-4f84-835f-85408eb8872d \" \")\n\nBooleans are a simple data type that can hold one of two values: true or false. Therefore they closely represent the concept of bits. Booleans are used in logical operations and control flow statements, such as if-else conditions and loops. They are essential for decision-making processes in programs, allowing the computer to execute different actions based on certain conditions.","19933413-c259-42aa-9b3c-d39d2fb2da78",[95],{"id":96,"data":97,"type":54,"version":35,"maxContentLevel":19},"0cdc04ac-fb14-4599-a36d-0849c884be41",{"type":54,"reviewType":19,"spacingBehaviour":35,"multiChoiceQuestion":98,"multiChoiceCorrect":100,"multiChoiceIncorrect":102,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6},[99],"Which data type can be either 'true' or 'false'?",[101],"Booleans",[103,104,105],"AND operators","Logic gates","Binary arithmetic",{"id":107,"data":108,"type":25,"version":19,"maxContentLevel":19,"summaryPage":110,"introPage":118,"pages":125},"0d3d6767-50cb-4e9d-a8cf-a886985b60d4",{"type":25,"title":109},"Variables and data types",{"id":111,"data":112,"type":19,"maxContentLevel":19,"version":35},"d5961e6b-2671-41ee-ae06-d275a4e82430",{"type":19,"title":30,"summary":113},[114,115,116,117],"Variables are named storage units that can change what they contain","Data types are like labels for variables, describing what kind of data is in them","Strings, integers, floating points, and Booleans are data types","Data type errors are a very common cause of issues in computers",{"id":119,"data":120,"type":39,"maxContentLevel":19,"version":35},"bb6a8a40-233a-47b0-b1a3-cc39fabc4699",{"type":39,"title":30,"intro":121},[122,123,124],"What variables and data types are","How different data types allow computers to accomplish different tasks","How a data type error led to the 'Nuclear Gandhi' bug",[126,159,175,203,218],{"id":127,"data":128,"type":35,"maxContentLevel":19,"version":25,"reviews":131},"59a5fb5a-d403-4dc8-85af-fe8ff7ba046a",{"type":35,"contentRole":25,"markdownContent":129,"audioMediaId":130},"Variables are named storage locations in a computer's memory. They allow computers to store, manipulate, and retrieve information efficiently. A data type is a classification for a variable, which specifies the type of data that a variable can hold.\n\nFor example, your computer might store a variable called ‘password’. It stores your password in that allocated part of memory, accessing it when needed. When you want to change your password, the data value within that variable will be changed, but the variable ‘password’ will continue to exist.\n\nData types are like labels for variables, which describe what kind of data they contain. In the case of the ‘password’ example given above, the data type would be a sequence of raw text, which we call a ‘string’. A string stored as the password might look like this: “Il0vekinnu123”. The ‘password’ variable is labelled by the computer as a string, meaning it knows to treat it as a line of raw text, rather than something else.\n\n![Graph](image://de6a20ab-0775-4bb2-8549-a006efca5723 \"Setting the data type of the variable 'password' to 'string', and then setting the value of the variable, in the Python coding language. Image: Public domain\")\n\nSo, we’d have a variable, which would be the ‘password’ container, a data type, which would be ‘string’, and a value that’s stored in that variable, ‘IlOvekinnu123’.","e4b90d99-dcaf-46b2-935a-1f884cde194c",[132,139],{"id":133,"data":134,"type":54,"version":35,"maxContentLevel":19},"71c24b37-e7cc-4264-8023-cc03b5f63201",{"type":54,"reviewType":20,"spacingBehaviour":35,"clozeQuestion":135,"clozeWords":137},[136],"Variables are named storage locations in a computer's memory.",[138],"Variables",{"id":140,"data":141,"type":54,"version":35,"maxContentLevel":19},"98a82b68-9fb9-42a0-bfd2-e75bfbd4c303",{"type":54,"reviewType":19,"spacingBehaviour":35,"collapsingSiblings":142,"multiChoiceQuestion":146,"multiChoiceCorrect":148,"multiChoiceIncorrect":150,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6,"matchPairsQuestion":154,"matchPairsPairs":156},[143,144,145],"f036c0a9-88f2-4254-af06-2cb9a1cdb855","faeace67-3b76-4839-9899-0d5cfe4d57e4","1823df16-e9ab-4c6e-ad24-5f67d2c03b11",[147],"A password value like \"Umbre11anapkin\" would be what data type?",[149],"String",[151,152,153],"Integer","Floating point","Boolean",[155],"Match the data type to its example:",[157],{"left":153,"right":158,"direction":19},"True",{"id":160,"data":161,"type":35,"maxContentLevel":19,"version":35,"reviews":164},"375a738e-7567-4c96-a1a9-58fd7b94a167",{"type":35,"contentRole":25,"markdownContent":162,"audioMediaId":163},"In addition to the string data type we mentioned, there are several basic data types that are used in most computer programs.\n\nIntegers are whole numbers and are one of the most commonly used data types in computing. Any regular, whole number is an integer. They are typically stored in a fixed number of bits, such as 8, 16, 32, or 64 bits.\n\n![Graph](image://266d121a-d15b-46d7-b67c-34aa4ce5a636 \"Declaring an 'age' variable as an integer, and setting its value\")\n\nOften, integers exist as signed and unsigned versions. Signed data types can represent both positive and negative values, while unsigned data types can only represent non-negative values.","bbadcf09-bac1-405f-a590-091475681d72",[165],{"id":145,"data":166,"type":54,"version":35,"maxContentLevel":19},{"type":54,"reviewType":19,"spacingBehaviour":35,"collapsingSiblings":167,"multiChoiceQuestion":168,"multiChoiceCorrect":170,"multiChoiceIncorrect":171,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6,"matchPairsQuestion":172,"matchPairsPairs":173},[140,143,144],[169],"A regular, whole number like '32' would be what data type?",[151],[152,149,153],[155],[174],{"left":151,"right":73,"direction":19},{"id":176,"data":177,"type":35,"maxContentLevel":19,"version":35,"reviews":180},"07195f45-aa64-464f-ad06-39e9fce6132c",{"type":35,"contentRole":25,"markdownContent":178,"audioMediaId":179},"Floating-point numbers, on the other hand, are used to represent real numbers that have a fractional component, such as 3.14 or -0.001. These numbers are stored in a format that includes a sign bit (used to indicate positive or negative), an exponent (to define the scale of the number), and a mantissa (which represents the precise numerical value of the number).\n\n![Graph](image://31cc0203-795a-4fd0-bc1c-5941056db88a \"Declaring a 'pi' variable, with the floating point data type\")\n\nAnother basic data type is a Boolean. This is a data value that can either be ‘True’ or ‘False’, and is very useful for many programming tasks. For example, a program might have a Boolean variable called ‘user_is_authorised’, and the value could be either ‘True’ or ‘False’. The program can access that variable to check whether a given user is allowed to view something.\n\n![Graph](image://4bbcce90-f0bb-4206-98aa-2ab9cb432e3b \"Declaring a Boolean variable\")\n\nIn addition to the basic data types, many programming languages support more complex data structures, such as arrays, lists, and objects. These are often collections of other data types or specifically designed custom data types.","2852d491-2857-4efb-a76d-18b62d25b424",[181,192],{"id":143,"data":182,"type":54,"version":35,"maxContentLevel":19},{"type":54,"reviewType":19,"spacingBehaviour":35,"collapsingSiblings":183,"multiChoiceQuestion":184,"multiChoiceCorrect":186,"multiChoiceIncorrect":187,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6,"matchPairsQuestion":188,"matchPairsPairs":189},[140,144,145],[185],"A fractional number like '3.1416' would be what data type?",[152],[151,153,149],[155],[190],{"left":152,"right":191,"direction":19},"3.1416",{"id":144,"data":193,"type":54,"version":35,"maxContentLevel":19},{"type":54,"reviewType":19,"spacingBehaviour":35,"collapsingSiblings":194,"multiChoiceQuestion":195,"multiChoiceCorrect":197,"multiChoiceIncorrect":198,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6,"matchPairsQuestion":199,"matchPairsPairs":200},[140,143,145],[196],"What data type can either be 'True' or 'False'?",[153],[151,152,149],[155],[201],{"left":149,"right":202,"direction":19},"\"Umbre11anapkin\"",{"id":204,"data":205,"type":35,"maxContentLevel":19,"version":25,"reviews":208},"02d42602-7c10-4d03-823d-7fa870a059d8",{"type":35,"contentRole":25,"markdownContent":206,"audioMediaId":207},"While data types seem like a basic concept, their misuse can lead to some surprising and sometimes catastrophic errors. One famous example is the \"Nuclear Gandhi bug\" in the 1991 game Civilization. In Civilization, leaders (the players' enemies) are assigned an aggression level. Remember, unsigned integers can only have positive values.\n\n![Graph](image://b29f2de0-2ebc-4173-a1db-c66cf9fafdd3 \"Image: Facenapalm, CC BY-SA 4.0 \u003Chttps://creativecommons.org/licenses/by-sa/4.0>, via Wikimedia Commons\")\n\nWhen a leader changes their government to a democracy the aggression level gets reduced by 2, with Gandhi starting with a level of 1. Because the resulting level of -1 cannot be stored in a range of 0-255, it was stored as 255.\n\nThis increased aggression level made the peace-loving leader suddenly attack other leaders with nuclear weapons. Though the founder of the game later stated that this was an urban legend, the story is still used to explain integer overflow.","966e0a83-743a-4338-b0a1-82baa573a180",[209],{"id":210,"data":211,"type":54,"version":35,"maxContentLevel":19},"b67c14d3-f933-4983-b1e2-6f0104cdd051",{"type":54,"reviewType":25,"spacingBehaviour":35,"binaryQuestion":212,"binaryCorrect":214,"binaryIncorrect":216},[213],"What caused the Nuclear Gandhi bug?",[215],"Unsigned integers cannot be negative",[217],"Signed integers cannot be negative",{"id":219,"data":220,"type":35,"maxContentLevel":19,"version":35,"reviews":223},"234c7139-1af9-4d1f-87f9-196fae975a95",{"type":35,"contentRole":25,"markdownContent":221,"audioMediaId":222},"The Gandhi bug may be an urban legend, but there are other, real-life cases where integer overflow errors have caused huge issues.\n\nOne famous example is the crash of the Ariane 5 rocket during its maiden flight in 1996, which can be predominantly attributed to an integer overflow error. This was a very simple error, caused by an attempted data conversion from a 64-bit floating-point value to a 16-bit signed integer.\n\nThese are just a few examples, and similar errors involving data types can lead to financial miscalculations, incorrect scientific results, or even malfunctions in critical systems. Careful selection and understanding of data types are essential for ensuring the reliability and accuracy of any program.","c726a7bd-1161-43d3-a8ab-5efbce97c27b",[224],{"id":225,"data":226,"type":54,"version":35,"maxContentLevel":19},"133bfbe0-ac0a-4e3c-93d8-332c0f12f1ca",{"type":54,"reviewType":35,"spacingBehaviour":35,"activeRecallQuestion":227,"activeRecallAnswers":229},[228],"What caused the crash of the Ariane 5 rocket?",[230],"Attempting to convert a 64-bit floating point to a 16-bit signed integer",{"id":232,"data":233,"type":25,"version":19,"maxContentLevel":19,"summaryPage":235,"introPage":242,"pages":249},"dfd9224b-8ac5-41fb-9521-0de0ec1a72e5",{"type":25,"title":234},"Character encoding, ASCII and unicode",{"id":236,"data":237,"type":19,"maxContentLevel":19,"version":35},"ba495e08-0266-4212-b371-539d7af82c87",{"type":19,"title":30,"summary":238},[239,240,241],"Character encoding means representing characters using binary code","The most influential character encoding system is ASCII","ASCII assigns numbers to 128 characters, and thus represents them through binary",{"id":243,"data":244,"type":39,"maxContentLevel":19,"version":35},"6f3b8dac-143e-4488-81b2-f8475f2f25b4",{"type":39,"title":30,"intro":245},[246,247,248],"What character encoding is","How binary can be used to represent text characters","What ASCII is and why it matters",[250,267,284],{"id":251,"data":252,"type":35,"maxContentLevel":19,"version":35,"reviews":255},"4dc50a45-5f0f-436b-98c7-d81671aa7c04",{"type":35,"contentRole":25,"markdownContent":253,"audioMediaId":254},"When you type a letter on your keyboard, how does your computer know which letter you pressed? The answer lies in character encoding, a system that translates characters into a format that computers can understand and process. One of the most fundamental and widely used character encoding schemes is ASCII, which stands for American Standard Code for Information Interchange.\n\nASCII was developed in the early 1960s and has since become a cornerstone of computer systems. It uses a 7-bit binary number to represent each character, allowing for 128 unique symbols. These symbols include the English alphabet (both uppercase and lowercase), digits, punctuation marks, and control characters like the newline or carriage return. For example, the uppercase letter 'A' is represented by the binary number 01000001, which is 65 in decimal form. Similarly, the lowercase 'a' is represented by 01100001, or 97 in decimal.\n\nThe beauty of ASCII lies in its simplicity and universality. Because it uses only 7 bits, it fits neatly into the 8-bit byte, the basic unit of data in most computer systems. This makes it highly efficient for storage and transmission. ASCII's straightforward mapping of characters to numbers also makes it easy to implement in hardware and software, ensuring compatibility across different systems and platforms.","8d6e2bc4-67e6-423d-89fc-75a23f81967b",[256],{"id":257,"data":258,"type":54,"version":35,"maxContentLevel":19},"3b4dd3c1-3e52-4e1f-adf3-7f1947c2b7fd",{"type":54,"reviewType":19,"spacingBehaviour":35,"multiChoiceQuestion":259,"multiChoiceCorrect":261,"multiChoiceIncorrect":263,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6},[260],"Which of these is a standard system for character encoding in computers?",[262],"ASCII",[264,265,266],"ATARI","ABACUS","ABBA",{"id":268,"data":269,"type":35,"maxContentLevel":19,"version":25,"reviews":272},"55bd6e39-f6a0-419c-8709-51d13f5f4487",{"type":35,"contentRole":25,"markdownContent":270,"audioMediaId":271},"However, ASCII has its limitations. With only 128 possible characters, it cannot accommodate the vast array of symbols used in languages other than English. To address this, various extensions and alternative encoding schemes have been developed.\n\nOne of the most notable is Unicode, which aims to provide a unique representation (called “code point”) for every character in every language. Unicode can use up to 32 bits per character, allowing for over a million unique symbols. Despite its broader scope, Unicode maintains backward compatibility with ASCII, meaning that the first 128 characters in Unicode are identical to those in ASCII.\n\n![Graph](image://fd9ca87f-e662-4c2a-a45d-603c752c0300 \"The Kinnu Octopus ‘Kiki’ as ASCII-Art; Source: generated via https://www.asciiart.eu/image-to-ascii\")","aa131e87-da3c-48d2-af15-53d159cf9057",[273],{"id":274,"data":275,"type":54,"version":25,"maxContentLevel":19},"8898fe2d-4e4b-45c4-a8af-f4295bd22905",{"type":54,"reviewType":19,"spacingBehaviour":35,"multiChoiceQuestion":276,"multiChoiceCorrect":278,"multiChoiceIncorrect":280,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6},[277],"What is a limitation of ASCII?",[279],"It has 128 possible characters",[281,282,283],"It has 256 possible characters","It can't represent numbers","It can't represent capital letters",{"id":285,"data":286,"type":35,"maxContentLevel":19,"version":25,"reviews":289},"f8a1555d-342d-45e9-bd67-cde98f6a5282",{"type":35,"contentRole":25,"markdownContent":287,"audioMediaId":288},"Character encoding is not just about representing letters and numbers; it also plays a crucial role in data integrity and security. When data is transmitted over a network, it is often encoded to ensure that it arrives at its destination without errors. \n\nEncoding schemes like Base64 are used to convert binary data into a text format that can be easily transmitted over text-based protocols like HTTP and SMTP. This is particularly important for sending binary files, such as images or executable programs, over the internet.\n\nMoreover, character encoding is essential for data storage and retrieval. When you save a text file, the characters are encoded into a binary format that can be written to disk. When you open the file, the binary data is decoded back into characters that you can read. If the encoding scheme is not correctly specified, you may end up with garbled text, a common issue when dealing with files created on different systems or in different languages.","1aa4ffb2-261d-4565-b790-1e6dc0a1f285",[290,297],{"id":291,"data":292,"type":54,"version":35,"maxContentLevel":19},"036ad399-2609-4a3d-895c-c6935db4a20f",{"type":54,"reviewType":35,"spacingBehaviour":35,"activeRecallQuestion":293,"activeRecallAnswers":295},[294],"What is Base64 used for?",[296],"Character encoding for transmission over text-based protocols",{"id":298,"data":299,"type":54,"version":35,"maxContentLevel":19},"5b5dfa61-c9a5-4830-b7ac-89d6ca6babea",{"type":54,"reviewType":19,"spacingBehaviour":35,"multiChoiceQuestion":300,"multiChoiceCorrect":302,"multiChoiceIncorrect":304,"multiChoiceMultiSelect":6,"multiChoiceRevealAnswerOption":6},[301],"What common issue occurs when the encoding scheme is not correctly specified for a text file?",[303],"Garbled text",[305,306,307],"Slow data transmission","Increased file size","Reduced data security",[309,407,564],{"id":23,"data":24,"type":25,"version":20,"maxContentLevel":19,"summaryPage":27,"introPage":36,"pages":310},[311,347,377],{"id":46,"data":47,"type":35,"maxContentLevel":19,"version":25,"reviews":50,"parsed":312},{"data":313,"body":315,"toc":345},{"title":30,"description":314},"At the heart of every computer lies the binary system, a method of representing data using only two states: 0 and 1. These states are known as bits, short for binary digits. A bit is the smallest unit of data in a computer and can represent one of two values, typically interpreted as off (0) or on (1).",{"type":316,"children":317},"root",[318,325,335,340],{"type":319,"tag":320,"props":321,"children":322},"element","p",{},[323],{"type":324,"value":314},"text",{"type":319,"tag":320,"props":326,"children":327},{},[328],{"type":319,"tag":329,"props":330,"children":334},"img",{"alt":331,"src":332,"title":333},"Graph","image://d0d20b6c-f084-499f-8a5e-84b097e4750f","Binary number table by Elaz85 (CC BY-SA 4.0) \u003Chttps://creativecommons.org/licenses/by-sa/4.0>, via Wikimedia Commons",[],{"type":319,"tag":320,"props":336,"children":337},{},[338],{"type":324,"value":339},"We’ve already discussed the hardware components that allow these values to be represented in the computer. Now we’re going to look into more detail about the kinds of data that can be represented and operations that can be performed using these methods.",{"type":319,"tag":320,"props":341,"children":342},{},[343],{"type":324,"value":344},"A group of eight bits forms a byte, which is a fundamental unit of data storage in computing. With eight bits, a byte can represent 256 different values, ranging from 0 to 255. For example, the number 1 would be 00000001, and the number 201 would be 11001001. Bytes are the building blocks for representing various types of data, including characters, numbers, and more complex structures.",{"title":30,"searchDepth":25,"depth":25,"links":346},[],{"id":75,"data":76,"type":35,"maxContentLevel":19,"version":19,"reviews":79,"parsed":348},{"data":349,"body":351,"toc":375},{"title":30,"description":350},"To understand how computers use the binary system to represent data, consider the example of a simple number. In the decimal system, the number 5 is represented as '5'. In binary, the same number is represented as '101'. Each position in a binary number represents a power of 2, starting from the rightmost digit.",{"type":316,"children":352},[353,357,362,367],{"type":319,"tag":320,"props":354,"children":355},{},[356],{"type":324,"value":350},{"type":319,"tag":320,"props":358,"children":359},{},[360],{"type":324,"value":361},"For instance, the binary number '101' can be broken down as follows: the rightmost digit (1) represents 2⁰ (equal to 1), the middle digit (0) represents 2¹ (equal to 2), and the leftmost digit (1) represents 2² (equal to 4). Adding these values together (1 * 2² + 0 * 2¹ + 1 * 2⁰) gives us the decimal number 5.",{"type":319,"tag":320,"props":363,"children":364},{},[365],{"type":324,"value":366},"Binary representation is not limited to numbers. It is also used to encode characters, images, and other types of data. For example, the letter 'A' is represented in binary as '01000001'. This encoding is part of a standardized system known as ASCII (American Standard Code for Information Interchange), which assigns a unique binary value to each character. By converting characters into binary, computers can store and manipulate text efficiently.",{"type":319,"tag":320,"props":368,"children":369},{},[370],{"type":319,"tag":329,"props":371,"children":374},{"alt":331,"src":372,"title":373},"image://0a66654a-d9d6-4cb6-8604-28004b21ddc1","Table of ASCII characters. Image: ASCII-Table.svg: ZZT32derivative work: Usha, Public domain, via Wikimedia Commons",[],{"title":30,"searchDepth":25,"depth":25,"links":376},[],{"id":90,"data":91,"type":35,"maxContentLevel":19,"version":35,"reviews":94,"parsed":378},{"data":379,"body":381,"toc":405},{"title":30,"description":380},"In addition to representing data, the binary system is crucial for data processing. Computers use binary arithmetic to perform calculations, logical operations, and data manipulation. Binary arithmetic involves operations such as addition, subtraction, multiplication, and division, all performed using binary numbers. These operations are carried out by the computer's central processing unit (CPU), which is designed to handle binary data at high speeds.",{"type":316,"children":382},[383,387,392,400],{"type":319,"tag":320,"props":384,"children":385},{},[386],{"type":324,"value":380},{"type":319,"tag":320,"props":388,"children":389},{},[390],{"type":324,"value":391},"Logical operations, such as AND, OR, and NOT, are also performed using binary values. These operations are fundamental to decision-making processes in computer programs. For example, an AND operation takes two binary inputs and produces a result of 1 only if both inputs are 1. Otherwise, the result is 0. As we’ve previously discussed, these logical operations enable computers to execute complex algorithms and make decisions based on binary data.",{"type":319,"tag":320,"props":393,"children":394},{},[395],{"type":319,"tag":329,"props":396,"children":399},{"alt":331,"src":397,"title":398},"image://8089a46e-e38a-4f84-835f-85408eb8872d"," ",[],{"type":319,"tag":320,"props":401,"children":402},{},[403],{"type":324,"value":404},"Booleans are a simple data type that can hold one of two values: true or false. Therefore they closely represent the concept of bits. Booleans are used in logical operations and control flow statements, such as if-else conditions and loops. They are essential for decision-making processes in programs, allowing the computer to execute different actions based on certain conditions.",{"title":30,"searchDepth":25,"depth":25,"links":406},[],{"id":107,"data":108,"type":25,"version":19,"maxContentLevel":19,"summaryPage":110,"introPage":118,"pages":408},[409,444,474,512,542],{"id":127,"data":128,"type":35,"maxContentLevel":19,"version":25,"reviews":131,"parsed":410},{"data":411,"body":413,"toc":442},{"title":30,"description":412},"Variables are named storage locations in a computer's memory. They allow computers to store, manipulate, and retrieve information efficiently. A data type is a classification for a variable, which specifies the type of data that a variable can hold.",{"type":316,"children":414},[415,419,424,429,437],{"type":319,"tag":320,"props":416,"children":417},{},[418],{"type":324,"value":412},{"type":319,"tag":320,"props":420,"children":421},{},[422],{"type":324,"value":423},"For example, your computer might store a variable called ‘password’. It stores your password in that allocated part of memory, accessing it when needed. When you want to change your password, the data value within that variable will be changed, but the variable ‘password’ will continue to exist.",{"type":319,"tag":320,"props":425,"children":426},{},[427],{"type":324,"value":428},"Data types are like labels for variables, which describe what kind of data they contain. In the case of the ‘password’ example given above, the data type would be a sequence of raw text, which we call a ‘string’. A string stored as the password might look like this: “Il0vekinnu123”. The ‘password’ variable is labelled by the computer as a string, meaning it knows to treat it as a line of raw text, rather than something else.",{"type":319,"tag":320,"props":430,"children":431},{},[432],{"type":319,"tag":329,"props":433,"children":436},{"alt":331,"src":434,"title":435},"image://de6a20ab-0775-4bb2-8549-a006efca5723","Setting the data type of the variable 'password' to 'string', and then setting the value of the variable, in the Python coding language. Image: Public domain",[],{"type":319,"tag":320,"props":438,"children":439},{},[440],{"type":324,"value":441},"So, we’d have a variable, which would be the ‘password’ container, a data type, which would be ‘string’, and a value that’s stored in that variable, ‘IlOvekinnu123’.",{"title":30,"searchDepth":25,"depth":25,"links":443},[],{"id":160,"data":161,"type":35,"maxContentLevel":19,"version":35,"reviews":164,"parsed":445},{"data":446,"body":448,"toc":472},{"title":30,"description":447},"In addition to the string data type we mentioned, there are several basic data types that are used in most computer programs.",{"type":316,"children":449},[450,454,459,467],{"type":319,"tag":320,"props":451,"children":452},{},[453],{"type":324,"value":447},{"type":319,"tag":320,"props":455,"children":456},{},[457],{"type":324,"value":458},"Integers are whole numbers and are one of the most commonly used data types in computing. Any regular, whole number is an integer. They are typically stored in a fixed number of bits, such as 8, 16, 32, or 64 bits.",{"type":319,"tag":320,"props":460,"children":461},{},[462],{"type":319,"tag":329,"props":463,"children":466},{"alt":331,"src":464,"title":465},"image://266d121a-d15b-46d7-b67c-34aa4ce5a636","Declaring an 'age' variable as an integer, and setting its value",[],{"type":319,"tag":320,"props":468,"children":469},{},[470],{"type":324,"value":471},"Often, integers exist as signed and unsigned versions. Signed data types can represent both positive and negative values, while unsigned data types can only represent non-negative values.",{"title":30,"searchDepth":25,"depth":25,"links":473},[],{"id":176,"data":177,"type":35,"maxContentLevel":19,"version":35,"reviews":180,"parsed":475},{"data":476,"body":478,"toc":510},{"title":30,"description":477},"Floating-point numbers, on the other hand, are used to represent real numbers that have a fractional component, such as 3.14 or -0.001. These numbers are stored in a format that includes a sign bit (used to indicate positive or negative), an exponent (to define the scale of the number), and a mantissa (which represents the precise numerical value of the number).",{"type":316,"children":479},[480,484,492,497,505],{"type":319,"tag":320,"props":481,"children":482},{},[483],{"type":324,"value":477},{"type":319,"tag":320,"props":485,"children":486},{},[487],{"type":319,"tag":329,"props":488,"children":491},{"alt":331,"src":489,"title":490},"image://31cc0203-795a-4fd0-bc1c-5941056db88a","Declaring a 'pi' variable, with the floating point data type",[],{"type":319,"tag":320,"props":493,"children":494},{},[495],{"type":324,"value":496},"Another basic data type is a Boolean. This is a data value that can either be ‘True’ or ‘False’, and is very useful for many programming tasks. For example, a program might have a Boolean variable called ‘user_is_authorised’, and the value could be either ‘True’ or ‘False’. The program can access that variable to check whether a given user is allowed to view something.",{"type":319,"tag":320,"props":498,"children":499},{},[500],{"type":319,"tag":329,"props":501,"children":504},{"alt":331,"src":502,"title":503},"image://4bbcce90-f0bb-4206-98aa-2ab9cb432e3b","Declaring a Boolean variable",[],{"type":319,"tag":320,"props":506,"children":507},{},[508],{"type":324,"value":509},"In addition to the basic data types, many programming languages support more complex data structures, such as arrays, lists, and objects. These are often collections of other data types or specifically designed custom data types.",{"title":30,"searchDepth":25,"depth":25,"links":511},[],{"id":204,"data":205,"type":35,"maxContentLevel":19,"version":25,"reviews":208,"parsed":513},{"data":514,"body":516,"toc":540},{"title":30,"description":515},"While data types seem like a basic concept, their misuse can lead to some surprising and sometimes catastrophic errors. One famous example is the \"Nuclear Gandhi bug\" in the 1991 game Civilization. In Civilization, leaders (the players' enemies) are assigned an aggression level. Remember, unsigned integers can only have positive values.",{"type":316,"children":517},[518,522,530,535],{"type":319,"tag":320,"props":519,"children":520},{},[521],{"type":324,"value":515},{"type":319,"tag":320,"props":523,"children":524},{},[525],{"type":319,"tag":329,"props":526,"children":529},{"alt":331,"src":527,"title":528},"image://b29f2de0-2ebc-4173-a1db-c66cf9fafdd3","Image: Facenapalm, CC BY-SA 4.0 \u003Chttps://creativecommons.org/licenses/by-sa/4.0>, via Wikimedia Commons",[],{"type":319,"tag":320,"props":531,"children":532},{},[533],{"type":324,"value":534},"When a leader changes their government to a democracy the aggression level gets reduced by 2, with Gandhi starting with a level of 1. Because the resulting level of -1 cannot be stored in a range of 0-255, it was stored as 255.",{"type":319,"tag":320,"props":536,"children":537},{},[538],{"type":324,"value":539},"This increased aggression level made the peace-loving leader suddenly attack other leaders with nuclear weapons. Though the founder of the game later stated that this was an urban legend, the story is still used to explain integer overflow.",{"title":30,"searchDepth":25,"depth":25,"links":541},[],{"id":219,"data":220,"type":35,"maxContentLevel":19,"version":35,"reviews":223,"parsed":543},{"data":544,"body":546,"toc":562},{"title":30,"description":545},"The Gandhi bug may be an urban legend, but there are other, real-life cases where integer overflow errors have caused huge issues.",{"type":316,"children":547},[548,552,557],{"type":319,"tag":320,"props":549,"children":550},{},[551],{"type":324,"value":545},{"type":319,"tag":320,"props":553,"children":554},{},[555],{"type":324,"value":556},"One famous example is the crash of the Ariane 5 rocket during its maiden flight in 1996, which can be predominantly attributed to an integer overflow error. This was a very simple error, caused by an attempted data conversion from a 64-bit floating-point value to a 16-bit signed integer.",{"type":319,"tag":320,"props":558,"children":559},{},[560],{"type":324,"value":561},"These are just a few examples, and similar errors involving data types can lead to financial miscalculations, incorrect scientific results, or even malfunctions in critical systems. Careful selection and understanding of data types are essential for ensuring the reliability and accuracy of any program.",{"title":30,"searchDepth":25,"depth":25,"links":563},[],{"id":232,"data":233,"type":25,"version":19,"maxContentLevel":19,"summaryPage":235,"introPage":242,"pages":565},[566,588,613],{"id":251,"data":252,"type":35,"maxContentLevel":19,"version":35,"reviews":255,"parsed":567},{"data":568,"body":570,"toc":586},{"title":30,"description":569},"When you type a letter on your keyboard, how does your computer know which letter you pressed? The answer lies in character encoding, a system that translates characters into a format that computers can understand and process. One of the most fundamental and widely used character encoding schemes is ASCII, which stands for American Standard Code for Information Interchange.",{"type":316,"children":571},[572,576,581],{"type":319,"tag":320,"props":573,"children":574},{},[575],{"type":324,"value":569},{"type":319,"tag":320,"props":577,"children":578},{},[579],{"type":324,"value":580},"ASCII was developed in the early 1960s and has since become a cornerstone of computer systems. It uses a 7-bit binary number to represent each character, allowing for 128 unique symbols. These symbols include the English alphabet (both uppercase and lowercase), digits, punctuation marks, and control characters like the newline or carriage return. For example, the uppercase letter 'A' is represented by the binary number 01000001, which is 65 in decimal form. Similarly, the lowercase 'a' is represented by 01100001, or 97 in decimal.",{"type":319,"tag":320,"props":582,"children":583},{},[584],{"type":324,"value":585},"The beauty of ASCII lies in its simplicity and universality. Because it uses only 7 bits, it fits neatly into the 8-bit byte, the basic unit of data in most computer systems. This makes it highly efficient for storage and transmission. ASCII's straightforward mapping of characters to numbers also makes it easy to implement in hardware and software, ensuring compatibility across different systems and platforms.",{"title":30,"searchDepth":25,"depth":25,"links":587},[],{"id":268,"data":269,"type":35,"maxContentLevel":19,"version":25,"reviews":272,"parsed":589},{"data":590,"body":592,"toc":611},{"title":30,"description":591},"However, ASCII has its limitations. With only 128 possible characters, it cannot accommodate the vast array of symbols used in languages other than English. To address this, various extensions and alternative encoding schemes have been developed.",{"type":316,"children":593},[594,598,603],{"type":319,"tag":320,"props":595,"children":596},{},[597],{"type":324,"value":591},{"type":319,"tag":320,"props":599,"children":600},{},[601],{"type":324,"value":602},"One of the most notable is Unicode, which aims to provide a unique representation (called “code point”) for every character in every language. Unicode can use up to 32 bits per character, allowing for over a million unique symbols. Despite its broader scope, Unicode maintains backward compatibility with ASCII, meaning that the first 128 characters in Unicode are identical to those in ASCII.",{"type":319,"tag":320,"props":604,"children":605},{},[606],{"type":319,"tag":329,"props":607,"children":610},{"alt":331,"src":608,"title":609},"image://fd9ca87f-e662-4c2a-a45d-603c752c0300","The Kinnu Octopus ‘Kiki’ as ASCII-Art; Source: generated via https://www.asciiart.eu/image-to-ascii",[],{"title":30,"searchDepth":25,"depth":25,"links":612},[],{"id":285,"data":286,"type":35,"maxContentLevel":19,"version":25,"reviews":289,"parsed":614},{"data":615,"body":617,"toc":633},{"title":30,"description":616},"Character encoding is not just about representing letters and numbers; it also plays a crucial role in data integrity and security. When data is transmitted over a network, it is often encoded to ensure that it arrives at its destination without errors.",{"type":316,"children":618},[619,623,628],{"type":319,"tag":320,"props":620,"children":621},{},[622],{"type":324,"value":616},{"type":319,"tag":320,"props":624,"children":625},{},[626],{"type":324,"value":627},"Encoding schemes like Base64 are used to convert binary data into a text format that can be easily transmitted over text-based protocols like HTTP and SMTP. This is particularly important for sending binary files, such as images or executable programs, over the internet.",{"type":319,"tag":320,"props":629,"children":630},{},[631],{"type":324,"value":632},"Moreover, character encoding is essential for data storage and retrieval. When you save a text file, the characters are encoded into a binary format that can be written to disk. When you open the file, the binary data is decoded back into characters that you can read. If the encoding scheme is not correctly specified, you may end up with garbled text, a common issue when dealing with files created on different systems or in different languages.",{"title":30,"searchDepth":25,"depth":25,"links":634},[],{"left":4,"top":4,"width":636,"height":636,"rotate":4,"vFlip":6,"hFlip":6,"body":637},24,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m9 18l6-6l-6-6\"/>",{"left":4,"top":4,"width":636,"height":636,"rotate":4,"vFlip":6,"hFlip":6,"body":639},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"/>",1778179456203]