Greetings!
I have few questions to ask and see if anyone knows the solution. I've tried to do a legit procedure but the answers are different from the calculator.
This is not the assignment but requesting for solutions and these are made up questions not related to the assignments (if you can trust me):
Using the powers of each digit in hex, convert the dec number 5610 to hex.
Using division method, convert the following dec numbers to binary. 5610 = ? base 2.
Convert the following binary numbers directly to Hex:
1000100010110101
Convert the following hex to binary:
5DF6
Convert the following numbers from dec to binary and then to hex:
2555.46782
-------------------------
These numbers are made up by me so I can understand the flow of solution and how everyone else does it.
NOTE: this is not doing my homework it is just asking for solutions of the following equations.
Thanks.
Maths (Computer architecture)
Page 1 of 12 Replies - 1715 Views - Last Post: 23 February 2011 - 09:12 AM
Replies To: Maths (Computer architecture)
#2
Re: Maths (Computer architecture)
Posted 21 February 2011 - 06:55 PM
Moved to Computer Science.
Normally I don't like linking to about.com, but this process is really good:
http://math.about.co.../changebase.htm
Normally I don't like linking to about.com, but this process is really good:
http://math.about.co.../changebase.htm
#3
Re: Maths (Computer architecture)
Posted 23 February 2011 - 09:12 AM
First and foremost remember that a number base is that base because each digit is the power of that base to that space.
decimal:
1234(dec)
1 thousand + 2 hundred + 3 tens + 4 ones
1 * 1000 + 2 * 100 + 3 * 10 + 4 * 1
1 * 10^3 + 2 * 10^2 + 3 * 10^1 + 4*10^0
this even works in fractional decimals:
12.34(dec)
1 ten + 2 ones + 3 tenths + 4 hundredths
1 * 10 + 2 * 1 + 3 * 1/10 + 4 * 1/100
1 * 10^1 + 2 * 10^0 + 3 * 10^-1 + 4 * 10^-2
in say binary...
1010.01(bin)
1 eight + 0 four + 1 two + 0 one + 0 half + 1 quarter
1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 + 0 * 1/2 + 1 * 1/4
1 * 2^3 + 0 * 2^2 + 1 * 2^1 + 0 * 2^0 + 0 * 2^-1 + 1 * 2^-2
add em' up... that's 10.25(dec)
Using the powers of each digit in hex is a bit time consuming. It requires you to start at the largest power of the base that is less than the decimal value. You count the number of time it goes into the value, mark that down in that place, and then move on to the next smallest.
300(dec) == 12C
powers go: 16^n => {0,1,2,3} == {1,16,256,4096}
256 is largest power less than
300 / 256 = 1 remainder 44, place 1 in 256 spot (3rd place), "1.."
move to next lowest, using remainder
44 / 16 = 2 remainder of 12, place 2 in 16 spot (2nd place), "12."
move to next lowest, using remainder
12 / 1 = 12 remainder 0, place 12 in 16 spot (1st place)... 12 in hex is 'C'... "12C"
the 'division method' is useful for converting to binary. Basically you just keep dividing by 2 over and over, and checking if the decimal value is odd or even (has a remainder or not).
10(dec) == 1010(bin)
10 divide by 2, get 5 rem 0. Prepend remainder to get "0"
5 divide by 2, get 2 rem 1. Prepend reaminder to get "10"
2 divide by 2, get 1 rem 0. Prepend remainder to get "010"
1 divide by 2, get 0 rem 1. Prepend remainder to get "1010"
As for converting between binary and hex is easy because they are powers of 2. 1 digit of hex becomes 4 digits of binary. And vice versa. You only need to handle the first 16 digitis of binary here.
37C(hex) == 0011 0111 1100(bin)
3 == 0011
7 == 0111
C == 1100
just stick em' together.
decimal:
1234(dec)
1 thousand + 2 hundred + 3 tens + 4 ones
1 * 1000 + 2 * 100 + 3 * 10 + 4 * 1
1 * 10^3 + 2 * 10^2 + 3 * 10^1 + 4*10^0
this even works in fractional decimals:
12.34(dec)
1 ten + 2 ones + 3 tenths + 4 hundredths
1 * 10 + 2 * 1 + 3 * 1/10 + 4 * 1/100
1 * 10^1 + 2 * 10^0 + 3 * 10^-1 + 4 * 10^-2
in say binary...
1010.01(bin)
1 eight + 0 four + 1 two + 0 one + 0 half + 1 quarter
1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 + 0 * 1/2 + 1 * 1/4
1 * 2^3 + 0 * 2^2 + 1 * 2^1 + 0 * 2^0 + 0 * 2^-1 + 1 * 2^-2
add em' up... that's 10.25(dec)
Using the powers of each digit in hex is a bit time consuming. It requires you to start at the largest power of the base that is less than the decimal value. You count the number of time it goes into the value, mark that down in that place, and then move on to the next smallest.
300(dec) == 12C
powers go: 16^n => {0,1,2,3} == {1,16,256,4096}
256 is largest power less than
300 / 256 = 1 remainder 44, place 1 in 256 spot (3rd place), "1.."
move to next lowest, using remainder
44 / 16 = 2 remainder of 12, place 2 in 16 spot (2nd place), "12."
move to next lowest, using remainder
12 / 1 = 12 remainder 0, place 12 in 16 spot (1st place)... 12 in hex is 'C'... "12C"
the 'division method' is useful for converting to binary. Basically you just keep dividing by 2 over and over, and checking if the decimal value is odd or even (has a remainder or not).
10(dec) == 1010(bin)
10 divide by 2, get 5 rem 0. Prepend remainder to get "0"
5 divide by 2, get 2 rem 1. Prepend reaminder to get "10"
2 divide by 2, get 1 rem 0. Prepend remainder to get "010"
1 divide by 2, get 0 rem 1. Prepend remainder to get "1010"
As for converting between binary and hex is easy because they are powers of 2. 1 digit of hex becomes 4 digits of binary. And vice versa. You only need to handle the first 16 digitis of binary here.
37C(hex) == 0011 0111 1100(bin)
3 == 0011
7 == 0111
C == 1100
just stick em' together.
This post has been edited by lordofduct: 23 February 2011 - 09:20 AM
Page 1 of 1

New Topic/Question
Reply



MultiQuote





|