{"id":1565,"date":"2020-11-08T22:05:03","date_gmt":"2020-11-08T22:05:03","guid":{"rendered":"https:\/\/computerscienced.co.uk\/site\/?page_id=1565"},"modified":"2023-01-01T19:24:19","modified_gmt":"2023-01-01T19:24:19","slug":"how-to-binary-addition","status":"publish","type":"page","link":"https:\/\/computerscienced.co.uk\/site\/binary\/binary-addition\/how-to-binary-addition\/","title":{"rendered":"How to &#8211; Binary addition"},"content":{"rendered":"\n<p>Binary addition is straight forward \u2013 all we need to do is follow these simple rules:<\/p>\n\n\n\n<p>0 + 0 = <strong>0<\/strong><\/p>\n\n\n\n<p>1 + 0 = <strong>1<\/strong><\/p>\n\n\n\n<p>0 + 1 = <strong>1<\/strong><\/p>\n\n\n\n<p>1 + 1 = <strong>10<\/strong><\/p>\n\n\n\n<p>1 + 1 + 1 = <strong>11<\/strong><\/p>\n\n\n\n<p>Binary addition is often done in multiple columns and we always start with the column on the <strong>right and move to the next column on the left<\/strong>.&nbsp;<\/p>\n\n\n\n<p><strong>EG<\/strong> &#8211; add binary numbers 10 + 01<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular has-medium-font-size\"><table class=\"has-fixed-layout\"><tbody><tr><td>&nbsp;<\/td><td>1<\/td><td>0<\/td><\/tr><tr><td><strong>+<\/strong><\/td><td>0<\/td><td>1<\/td><\/tr><tr><td><strong>=<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>1<\/strong><\/td><\/tr><tr><td><strong>Explanation<\/strong><\/td><td>(1 + 0 = 1)<\/td><td>(0 + 1 = 1)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-border-background-color has-background has-large-font-size\"><strong>10 + 01 = 11<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Binary 1 + 1<\/h2>\n\n\n\n<p>If we get a 1 + 1 our rules state we get <strong>10<\/strong>.\u00a0 We should carry the 1 over to the column on the left and include this when adding up the next column.\u00a0 The 0 will stay in the current column.\u00a0<\/p>\n\n\n\n<p><strong>EG<\/strong> &#8211; add binary numbers 01 + 01<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><tbody><tr><td>&nbsp;<\/td><td>0<\/td><td>1<\/td><\/tr><tr><td><strong>+<\/strong><\/td><td>0<\/td><td>1<\/td><\/tr><tr><td><strong>=<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>0<\/strong><\/td><\/tr><tr><td><strong>Carry<\/strong><\/td><td>1<\/td><td>&nbsp;<\/td><\/tr><tr><td><strong>Explanation<\/strong><\/td><td>(0 + 0 + 1 = 1 the 1 is our carry from the column on the right)<\/td><td>(1 + 1 = 10 the 1 is carried to the next column and the 0 is placed in the current column)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-border-background-color has-background has-large-font-size\"><strong>01 + 01 = 10<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Binary 1 + 1 (in the left column)<\/h2>\n\n\n\n<p>If we get a 1 + 1 in our furthest left column we simply add another digit on.<\/p>\n\n\n\n<p><strong>EG<\/strong> &#8211; add binary numbers 11 + 01<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><tbody><tr><td>&nbsp;<\/td><td>&nbsp;<\/td><td>1<\/td><td>1<\/td><\/tr><tr><td><strong>+<\/strong><\/td><td>&nbsp;<\/td><td>0<\/td><td>1<\/td><\/tr><tr><td><strong>=<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>0<\/strong><\/td><td><strong>0<\/strong><\/td><\/tr><tr><td><strong>Carry<\/strong><\/td><td>1<\/td><td>1<\/td><td>&nbsp;<\/td><\/tr><tr><td><strong>Explanation<\/strong><\/td><td>&nbsp;<\/td><td>(1 + 0 + 1 = 10 the 1 is carried to the next column and the 0 is placed in the current column)<\/td><td>(1 + 1 = 10 the 1 is carried to the next column and the 0 is placed in the current column)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-border-background-color has-background has-large-font-size\"><strong>11 + 01 = 100<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Binary 1 + 1 + 1<\/h2>\n\n\n\n<p>If we get a 1 + 1 + 1 (because of a carry) our rules state we get 11.&nbsp; We should carry the 1 over to the column on the left and include this when adding up the next column.&nbsp; The 1 will stay in the current column.&nbsp;<\/p>\n\n\n\n<p><strong>EG<\/strong> &#8211; add binary numbers 11 + 11<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><tbody><tr><td>&nbsp;<\/td><td>&nbsp;<\/td><td>1<\/td><td>1<\/td><\/tr><tr><td><strong>+<\/strong><\/td><td>&nbsp;<\/td><td>1<\/td><td>1<\/td><\/tr><tr><td><strong>=<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>0<\/strong><\/td><\/tr><tr><td><strong>Carry<\/strong><\/td><td>1<\/td><td>1<\/td><td>&nbsp;<\/td><\/tr><tr><td><strong>Explanation<\/strong><\/td><td>&nbsp;<\/td><td>(1 + 1 + 1 = 11 the 1 is carried to the next column and the 1 is placed in the current column)<\/td><td>(1 + 1 = 10 the 1 is carried to the next column and the 0 is placed in the current column)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-border-background-color has-background has-large-font-size\"><strong>11 + 11 = 110<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Binary addition to 8 digits<\/h2>\n\n\n\n<p>The OCR Computer Science GCSE specification expects you to be able to add 8 bits of binary together <strong>EG<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"has-fixed-layout\"><tbody><tr><td>&nbsp;<\/td><td>1<\/td><td>0<\/td><td>1<\/td><td>0<\/td><td>1<\/td><td>0<\/td><td>1<\/td><td>0<\/td><\/tr><tr><td><strong>+<\/strong><\/td><td>0<\/td><td>0<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><\/tr><tr><td><strong>=<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>0<\/strong><\/td><td><strong>1<\/strong><\/td><td><strong>0<\/strong><\/td><td><strong>0<\/strong><\/td><td><strong>1<\/strong><\/td><\/tr><tr><td><strong>Carry<\/strong><\/td><td>&nbsp;<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>&nbsp;<\/td><td>&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Binary Overflow<\/strong><\/h2>\n\n\n\n<p>If a binary addition creates an extra digit like in some of the examples above it can cause an overflow error in the processor.&nbsp; An 8-bit processor cannot handle 9 bits and will only receive the first 8 bits leading to unexpected results.<\/p>\n\n\n\n<p>A famous example of an overflow error is the Ariane 5 space rocket launch which went wrong due to an overflow error (luckily it was an unmanned space rocket and no one was hurt!). \u00a0\u00a0\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Binary addition is straight forward \u2013 all we need to do is follow these simple rules: 0 + 0 =&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2581,"parent":1039,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"disable_featured_image":true,"footnotes":""},"class_list":["post-1565","page","type-page","status-publish","has-post-thumbnail","hentry"],"blog_post_layout_featured_media_urls":{"thumbnail":["https:\/\/computerscienced.co.uk\/site\/wp-content\/uploads\/2021\/09\/undraw_building_blocks_n0nc.svg",150,150,true],"full":["https:\/\/computerscienced.co.uk\/site\/wp-content\/uploads\/2021\/09\/undraw_building_blocks_n0nc.svg",1040,649,false]},"categories_names":null,"comments_number":"0","_links":{"self":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/comments?post=1565"}],"version-history":[{"count":7,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1565\/revisions"}],"predecessor-version":[{"id":6138,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1565\/revisions\/6138"}],"up":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1039"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/media\/2581"}],"wp:attachment":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/media?parent=1565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}