{"id":6152,"date":"2023-01-01T21:09:28","date_gmt":"2023-01-01T21:09:28","guid":{"rendered":"https:\/\/computerscienced.co.uk\/site\/?page_id=6152"},"modified":"2023-01-01T21:09:28","modified_gmt":"2023-01-01T21:09:28","slug":"how-to-denary-to-hexadecimal-conversion","status":"publish","type":"page","link":"https:\/\/computerscienced.co.uk\/site\/hexadecimal-conversion\/how-to-denary-to-hexadecimal-conversion\/","title":{"rendered":"How to &#8211; Denary to Hexadecimal Conversion"},"content":{"rendered":"\n<p>Converting decimal (denary) into hexadecimal is very simple. All we need is to remember that hexadecimal is a base 16 number.\u00a0 This means that each number column can contain 16 characters.\u00a0 Hexadecimal goes from 0 to F:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Decimal Number<\/strong><\/td><td><strong>Hexadecimal Number<\/strong><\/td><\/tr><tr><td>0<\/td><td>0<\/td><\/tr><tr><td>1<\/td><td>1<\/td><\/tr><tr><td>2<\/td><td>2<\/td><\/tr><tr><td>3<\/td><td>3<\/td><\/tr><tr><td>4<\/td><td>4<\/td><\/tr><tr><td>5<\/td><td>5<\/td><\/tr><tr><td>6<\/td><td>6<\/td><\/tr><tr><td>7<\/td><td>7<\/td><\/tr><tr><td>8<\/td><td>8<\/td><\/tr><tr><td>9<\/td><td>9<\/td><\/tr><tr><td>10<\/td><td>A<\/td><\/tr><tr><td>11<\/td><td>B<\/td><\/tr><tr><td>12<\/td><td>C<\/td><\/tr><tr><td>13<\/td><td>D<\/td><\/tr><tr><td>14<\/td><td>E<\/td><\/tr><tr><td>15<\/td><td>F<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>EG<\/strong><\/p>\n\n\n\n<p>Using the table &#8211; <strong>7 in decimal is 7 in hexadecimal.<\/strong><\/p>\n\n\n\n<p>Using the table &#8211; <strong>10 in decimal is A in hexadecimal<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Denary to Hexadecimal Conversion to 2 figures<\/h1>\n\n\n\n<p>In GCSE computer science you will be expected to convert denary into 2 figure hexadecimal.\u00a0 Again we need to remember that hexadecimal is a base 16 number and each number column can go from 0-9 and A-F.\u00a0<\/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\">Example 1<\/h2>\n\n\n\n<p><strong>Convert decimal number 162 into hexadecimal<\/strong><\/p>\n\n\n\n<p>Draw out a 2 column table with 16 on the left and 1 on the right.  We now take our original number and divide it by 16<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>16<\/strong><\/td><td><strong>1<\/strong><\/td><\/tr><tr><td>162 \/ 16<br><strong> = 10 remainder 2<\/strong><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The answer is 10 (16 x 10 = 160) and gives us a remainder of 2.  The remainder of 2 is then carried across to the 1 column.  The remainder is then divided by 1.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>16<\/strong><\/td><td><strong>1<\/strong><\/td><\/tr><tr><td>162 \/ 16<br><strong> = 10<\/strong><\/td><td>2 \/ 1<br><strong>= 2<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>We now need to check our columns to see if any number needs converting to a hexadecimal character.  In  the 16 column we have a 10.  A 10 in hexadecimal is the letter A so we substitute the 10 for an A.  <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>16<\/strong><\/td><td><strong>1<\/strong><\/td><\/tr><tr><td>162 \/ 16<br><strong> = 10<\/strong><\/td><td>2 \/ 1<br><strong>= 2<\/strong><\/td><\/tr><tr><td><strong>10 = A<\/strong><\/td><td><strong>2 = 2<\/strong><\/td><\/tr><tr><td><strong>= A<\/strong><\/td><td><strong>= 2<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The final step is to put the 2 columns together<\/p>\n\n\n\n<p class=\"has-border-background-color has-background\"><strong>162 in denary = A2 in hexadecimal <\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Example 2<\/h2>\n\n\n\n<p><strong>Convert decimal number 40 into hexadecimal<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>16<\/strong><\/td><td><strong>1<\/strong><\/td><\/tr><tr><td>40 \/ 16<br><strong>= 2 remainder 8<\/strong><\/td><td>8 \/ 1<br><strong>= 8<\/strong><\/td><\/tr><tr><td><strong>2 = 2<\/strong><\/td><td><strong>8 = 8<\/strong><\/td><\/tr><tr><td><strong>= 2<\/strong><\/td><td><strong>= 8<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-border-background-color has-background\"><strong>40 in decimal = 28 in hexadecimal<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Converting decimal (denary) into hexadecimal is very simple. All we need is to remember that hexadecimal is a base 16&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2739,"parent":956,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"disable_featured_image":true,"footnotes":""},"class_list":["post-6152","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\/10\/undraw_Share_opinion_re_4qk7.svg",150,150,true],"full":["https:\/\/computerscienced.co.uk\/site\/wp-content\/uploads\/2021\/10\/undraw_Share_opinion_re_4qk7.svg",965,727,false]},"categories_names":null,"comments_number":"0","_links":{"self":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/6152","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=6152"}],"version-history":[{"count":1,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/6152\/revisions"}],"predecessor-version":[{"id":6153,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/6152\/revisions\/6153"}],"up":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/956"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/media\/2739"}],"wp:attachment":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/media?parent=6152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}