{"id":6623,"date":"2022-03-10T00:00:00","date_gmt":"2022-03-09T23:00:00","guid":{"rendered":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/?post_type=purple_issue&#038;p=6623"},"modified":"2022-03-23T14:44:15","modified_gmt":"2022-03-23T13:44:15","slug":"how-do-you-read-binary-numbers","status":"publish","type":"post","link":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/2022\/03\/10\/how-do-you-read-binary-numbers\/","title":{"rendered":"How do you read binary numbers?"},"content":{"rendered":"\n<h2 class=\"has-text-align-center\"><strong>How do you read binary numbers?<\/strong><\/h2>\n\n<p class=\"has-text-align-center intro\">ISABEL BLACKMORE<\/p>\n\n<div class=\"no-tts wp-block-image\"><figure class=\"no-tts aligncenter size-large\"><img loading=\"lazy\" width=\"674\" height=\"1024\" src=\"https:\/\/dj9jqhxgw9833.cloudfront.net\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-674x1024.jpg\" alt=\"\" class=\"no-tts wp-image-7058\" srcset=\"https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-674x1024.jpg 674w, https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-198x300.jpg 198w, https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-768x1167.jpg 768w, https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755.jpg 900w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><\/figure><\/div>\n\n<p class=\"article-full-body sans-serif\">We count in decimal \u2013 that\u2019s multiples of 10, or base 10. That means we use 10 distinct symbols to write down all numbers: 0,1,2,3,4,5,6,7,8,9. Perhaps having 10 digits on our hands helps with the maths. It was not always this way \u2013 duodecimal, or base 12, was a very popular system: 12 inches to the foot, 12 pence to a shilling, 12 zodiac signs, 12 months in a year and 2x 12 hours in a day. In duodecimal maths we use 12 symbols to write down all the numbers: 0,1,2,3,4,5,6,7,8,9,A,B. Duodecimal is superior for mental arithmetic because it has four non-trivial factors: it is divisible by 2, 3, 4 and 6, compared to the decimal system, which has only two non-trivial factors: 2 and 5.<\/p>\n\n<p class=\"article-full-body sans-serif\">But computers don\u2019t count fingers or perform mental arithmetic, they operate using electricity, and so they need a simpler way to count. Their logic circuits just understand on and off, which means the native counting system for computers is binary, or base 2. So they have just two symbols to write down all numbers: 0,1. This is not a problem, because using the right combination of 1s and 0s we can represent anything \u2013 but it does mean that we need quite a lot of them.<\/p>\n\n<p class=\"article-full-body sans-serif\">To understand a number in binary, for whole numbers we need to recognise that the most significant binary digit (or bit for short) is on the left and least significant bit is on the right. As we look right to left, each bit represents a higher power of 2 (because binary is base 2). So the binary number 1101 is, looking at each bit from right to left: <strong>1 <\/strong>x 2 <sup>0 <\/sup>+ <strong>0 <\/strong>x 2 <sup>1 <\/sup>+ <strong>1 <\/strong>x 2 <sup>2 <\/sup>+ <strong>1 <\/strong>x 2 <sup>3 <\/sup>= 1 + 0 + 4 + 8 = 13.<\/p>\n\n<p class=\"article-full-body sans-serif\">Or, the binary number 1000 is <strong>0 <\/strong>x 2 <sup>0 <\/sup>+ <strong>0 <\/strong>x 2 <sup>1 <\/sup>+ <strong>0 <\/strong>x 2 <sup>2 <\/sup>+ <strong>1 <\/strong>x 2 <sup>3 <\/sup>= 0 + 0 + 0 + 8 = 8.<\/p>\n\n<p class=\"article-full-body sans-serif\">As with any numbering system, use more digits and you can represent bigger numbers. We can also represent fractional or floating-point numbers by adding a notional point. So 0111.0101 becomes <strong>1 <\/strong>x 2 <sup>0 <\/sup>+ <strong>1 <\/strong>x 2 <sup>1 <\/sup>+ <strong>1 <\/strong>x 2 <sup>2 <\/sup>+ <strong>0 <\/strong>x 2 <sup>3 <\/sup>= 7 for the whole part, and (this time working left to right from the point) <strong>0 <\/strong>x 2 <sup>-1 <\/sup>+ <strong>1 <\/strong>x 2 <sup>-2 <\/sup>+ <strong>0 <\/strong>x 2 <sup>-3 <\/sup>+ <strong>1 <\/strong>x 2 <sup>-4 <\/sup>= 1\/4 + 1\/16 = 0.3125, making the number 7.3125.<\/p>\n\n<p class=\"article-full-body sans-serif\">However, representing negative numbers in binary can be more tricky \u2013 there are actually three different methods! The easiest is just to use a spare bit on the left, so if 00111 is 7, then 10111 is -7. But the most common approach in computers is called twos complement. In this approach to represent a negative number we invert all the bits and add 1. So if 00111 is 7 then 11000+1 = 11001 represents -7. To flip the sign we invert the bits and add 1 again: 00110+1 = 00111. Clever, eh? <strong>PB<\/strong><\/p>\n\n<section class=\"wp-block-uagb-section uagb-section__wrap uagb-section__background-color uagb-block-e32abd68-5dfd-4176-a3b5-9ce54da3f5f3\"><div class=\"uagb-section__overlay\"><\/div><div class=\"uagb-section__inner-wrap\">\n<p class=\"has-text-align-center\"><span class=\"has-inline-color has-ccp-primary-light-color\">Email your questions to<\/span> <br><a href=\"mailto:questions@sciencefocus.com\">questions@sciencefocus.com<\/a> <br><span class=\"has-inline-color has-ccp-primary-light-color\">or submit on Twitter<\/span> <br><a href=\"https:\/\/twitter.com\/sciencefocus\" data-type=\"URL\" data-id=\"https:\/\/twitter.com\/sciencefocus\">@sciencefocus<\/a><\/p>\n<\/div><\/section>\n\n<p class=\"footer\">IMAGE: GETTY IMAGES<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you read binary numbers? ISABEL BLACKMORE We count in decimal \u2013 that\u2019s multiples of 10, or base 10. That means we use 10 distinct symbols to write down all numbers: 0,1,2,3,4,5,6,7,8,9. Perhaps having 10 digits on our hands helps with the maths. It was not always this way \u2013 duodecimal, or base 12, [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":7058,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ub_ctt_via":"","purple_page_number":"84","purple_custom_meta_purple_page_number":"84","purple_seq_number":"2","purple_custom_meta_purple_seq_number":"2","purple_source_article":"article_84-2.xml","purple_custom_meta_purple_source_article":"article_84-2.xml","purple_source_issue":"March-2022","purple_custom_meta_purple_source_issue":"March-2022","purple_external_id":"March-2022-84-2","purple_custom_meta_purple_external_id":"March-2022-84-2","purple_issue_code":"|0000089651||","purple_custom_meta_purple_issue_code":"|0000089651||","purple_android_product":"com.focus.magazine.issue375","purple_custom_meta_purple_android_product":"com.focus.magazine.issue375","purple_ios_product":"com.focus.magazine.issue375","purple_custom_meta_purple_ios_product":"com.focus.magazine.issue375","purple_web_product":"","purple_custom_meta_purple_web_product":"","purple_publication_id":"0f422ad1-c939-476d-9f82-a410052ad4c3","purple_migrated":"","kt_blocks_editor_width":"","apple_news_api_created_at":"2022-03-11T11:29:45Z","apple_news_article-theme":"","apple_news_api_id":"b68e2c2c-b40e-4b64-a983-90a1f03919de","apple_news_api_modified_at":"2022-03-23T13:44:21Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAACw==","apple_news_api_share_url":"https:\/\/apple.news\/Ato4sLLQOS2Spg5Ch8DkZ3g","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":true,"apple_news_is_preview":true,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_article_theme":"","apple_news_sections":"[]"},"categories":[30],"tags":[15],"apple_news_notices":[],"featured_image_src":"https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755.jpg","author_info":{"display_name":"importmanagerhub@sprylab.com","author_link":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/author\/importmanagerhubsprylab-com\/"},"acf":{"readingTimeMinutes":"3","apple_news_title":""},"uagb_featured_image_src":{"full":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755.jpg",900,1367,false],"thumbnail":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-150x150.jpg",150,150,true],"medium":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-198x300.jpg",198,300,true],"medium_large":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-768x1167.jpg",768,1167,true],"large":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755-674x1024.jpg",674,1024,true],"1536x1536":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755.jpg",900,1367,false],"2048x2048":["https:\/\/c01.purpledshub.com\/uploads\/sites\/42\/2022\/03\/GettyImages-1288643755.jpg",900,1367,false]},"uagb_author_info":{"display_name":"importmanagerhub@sprylab.com","author_link":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/author\/importmanagerhubsprylab-com\/"},"uagb_comment_info":0,"uagb_excerpt":"How do you read binary numbers? ISABEL BLACKMORE We count in decimal \u2013 that\u2019s multiples of 10, or base 10. That means we use 10 distinct symbols to write down all numbers: 0,1,2,3,4,5,6,7,8,9. Perhaps having 10 digits on our hands helps with the maths. It was not always this way \u2013 duodecimal, or base 12,&hellip;","_links":{"self":[{"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/posts\/6623"}],"collection":[{"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/comments?post=6623"}],"version-history":[{"count":9,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/posts\/6623\/revisions"}],"predecessor-version":[{"id":11054,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/posts\/6623\/revisions\/11054"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/media\/7058"}],"wp:attachment":[{"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/media?parent=6623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/categories?post=6623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c01.purpledshub.com\/bbcsciencefocus\/wp-json\/wp\/v2\/tags?post=6623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}