The numbers 6B and 12 are displayed in hexadecimal form. Convert them into binary form and perform binary addition to find the sum. Convert your answer back into hexadecimal. Show your workings.

The first step is to work out what 6B and 12 are in binary. Starting with 6B, we need to find a four-bit representation of both 6 and B. 6, converts straight to its binary form, simply by adding 1s to the and 2 columns, giving us 0110. To work out B, we need to look at the hexadecimal scale, which is: 0 1 2 3 4 5 6 7 8 9 A B C D E F. By counting up to B, we discover that it is code for the number 11, since it comes two places after 9. To display the number 11, we add 1s to the 8, 2 and columns, because these numbers total 11. By adding 0110 (6) and 1011 (B), we can see that the binary, (1-byte) representation of 6B is 01101011. We can use the same method to work out 12, which is 00011101. To find the sum of the two binary numbers, we can put one over the other, like a traditional addition sum: 0 1 1 0 1 0 1 1 ------------------- 0 0 0 1 0 0 1 0 For each column, if there is only a single 1, that column has a 1 for our answer. If it has two 0s, that column displays a 0. If there are two 1s, that column displays a 0, and we add 1 to the next column. This is called shifting, and it's the same process as in standard arithmetic. The result of our addition is 0111 1101 which is the number 125, which we can convert back to hexadecimal by reversing the method we used at the start of the question. This gives us 7D.

Related Computing A Level answers

All answers ▸

Given an ordered array of integers "V" and a integer "Sum", write a function that would return "true" if it finds two numbers in V that add up to Sum, and "false" otherwise.


How can the idea of precondtioning as part of 'Thinking Ahead' benefit a programmer when writing code?


Given a graph with n nodes and m edges, every edge has a passing cost that can be negative, find the minimum distance between node 1 and every other node


What is the decimal equivalent of the following sequence of bits, which represents an unsigned binary integer: 1101001. What is the decimal equivalent if the sequence in bits encodes a two’s complement binary integer.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy