Advanced Math/Hello

Advertisement


Question
QUESTION: 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


base changes
base changes  
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

Answer
Hi 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

Advanced Math

All Answers


Answers by Expert:


Ask Experts

Volunteer


Sherry Wallin

Expertise

I can answer most questions up through Calculus and some in Number Theory and Abstract Algebra.

Experience

I have had my Bachelor's Degree since 1987 and have been a teacher since 1988. I earned my Masters Degree in Mathematics May 2010. I have been teaching at the same community college since 2002.

Education/Credentials
I have taught 12 years at the community college level, medical college, and technical college as well as a high school instructor and alternative education instructor and charter school instructor.

Awards and Honors
Master's GPA 3.56 Bachelor's GPA 3.34 Post grad work not degree related GPA 4.0

©2012 About.com, a part of The New York Times Company. All rights reserved.