Advanced Math/Hello
Expert: Sherry Wallin - 6/29/2009
QuestionQUESTION: Hi,
I need help with these. Can you please help?
1) Convert (10011110)^2 to a hexadecimal number
2) Convert (EF)^16 to a binary number
3) Convert (9A2)^16 to a binary number
4) Add (2A31B)^16 and (3F1D)^16
5) Subtract (2A)^16 from (3B)^16
6) Add (10101011)^2 and (3C)^16
7) Subtract (3F)^16 from (11101011)^2. Convert the difference to a hexadecimal number
ANSWER: Andy I sent an explanation but it went to internet heaven. I will write one and attach it with a lengthier explanation. Basically I told you that one way to do these problems was to convert to base 10 do the operations and then convert to base 16 and I did problem 1 for you.
Typically the carot '^' is used for powers not bases. I did this problem using (10011110)^2 to mean 10011110*10011110 and now I am thinking you just mean base 2....so now I will redo my explanation to fit this definition. It is better to just use a subscript or say base 2 or base 10 or base 16 for hexadecimal.
Math Prof
---------- FOLLOW-UP ----------
QUESTION: Hello,
I'm confused with this..
If this pseudocode were an actual program, what would it display?
Declare Integer num = 99
Set num = 5
Display num
AnswerHi Andy~
This is computer programming code but I can help you with this one.
When you declare a variable in a programs code, it will be that value unless there is something after that that changes the value. The code has made a declaration that you have a variable called num that has an initial value of 99. Additionally the values will always be integers. (In contrast to a real number, any arithmetic that might be using this 'num' will round off to an integer). Next it takes num and replaces the 99 with 5 with the Set num = 5. Then it displays what value is stored in num which is now 5. This code could have been shortened to have the same result with:
Declare Integer num = 5
Display num
Math Prof