查看: 1641|回复: 6
|
Base and Number Representation
[复制链接]
|
|
Base and Number Representation
你们还记得binary, octal, decimal and hexadecimal吗???
现在读着discrete math, 没有课本, 只靠老师口述
google的资料多, 可是不是我要的, 有ebook介绍吗??
我想问大家
如何convert those number with implied point(eg. decimal point) from Xbase to Ybase
like
603.25 base8 to base10
0.2 base10 to base2
and
another shortcut/way of conversion except multiplication and devision, like
base 8 to base 2
4 0 1
4 2 1 | 4 2 1 | 4 2 1
1 0 0 0 0 0 0 0 1
application method
like, add 0 at the right of binary string will double the value of binary string |
|
|
|
|
|
|
|
发表于 19-5-2008 03:48 PM
|
显示全部楼层
原帖由 晨天 于 19-5-2008 01:33 PM 发表 
Base and Number Representation
你们还记得binary, octal, decimal and hexadecimal吗???
现在读着discrete math, 没有课本, 只靠老师口述
google的资料多, 可是不是我要的, 有ebook介绍吗??
...
从其他的 base 去 base 10 方法还是一样。
如 603.25 base 8 to base10
8^2 8 ^1 8^0 8^-1 8^-2
6 0 3 2 1 = 6 * 8^2 + 3*8^0 + 2*8^-1 + 1*8^-2 = 387.265625
从 base 10 去其他的 base 10 方法却是相反
如 0.2 base10 to base2
0.2 * 2 = 0.4 取 0 ------> 0 ---(1)
0.4* 2 = 0.8 取 0 ------> 0
0.8*2 = 1.6 取 1 减 1 ---> 1
0.6*2 = 1.2 取 1 减 1 ---> 1
0.2 * 2 = 0.4 取 0 ------> 0 重复(1)
所以 0.2 base 10 等于 0.00110011........ base 2 |
|
|
|
|
|
|
|
发表于 19-5-2008 05:01 PM
|
显示全部楼层
哦~
這一個是我最喜歡的~
以下是conversion表:
x2 除8
Base 2 ---> Base 10 ---> Base 8
x2 除16
Base 2 ---> Base 10 ---> Base 16
同樣的,
x8 除2
Base 8 ---> Base 10 ---> Base 2
x8 除16
Base 8 --->Base 10 ---> Base 16
結論是:
i)任何一種 BASE 想要變成 BASE 10的數字, 就得 乘上 那個 "任何的Base的數字“。 ("Base ?的數字" x "?" = Base 10的數字)
ii)BASE 10的數字 想要變成 任何的Base的數字, 就得 除以 那個 "任何的Base的數字“。 (Base 10的數字 除以 "?" = "Base ?的數字"
Base 10 是 "老大"
若你想希望 你的conversion 不必 經過 "老大" BASE 10.
就走 short cut的路綫。。。
i) Base 2 ---> Base 8, or
Base 8 ---> Base 2
Base 2 | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 | Base 8 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
ii) Base 2 ---> Base 16, or
Base 16 ---> Base 2
Base 2 | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 | Base 16 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
很好玩~ |
|
|
|
|
|
|
|

楼主 |
发表于 19-5-2008 06:14 PM
|
显示全部楼层
谢谢flash和hebe
普通的conversion没问题
问题是没有课本, google的资料都不是这个level
有好书介绍吗??????
implied point解决了
negation, 2's complement解决了
shortcut?只有酱多?????
binary coded decimal, 又一个kacau的method, 和普通binary经常confuse |
|
|
|
|
|
|
|
发表于 19-5-2008 07:01 PM
|
显示全部楼层
原帖由 晨天 于 19-5-2008 06:14 PM 发表 
谢谢flash和hebe
普通的conversion没问题
问题是没有课本, google的资料都不是这个level
有好书介绍吗??????
implied point解决了
negation, 2's complement解决了
shortcut?只有酱多?????
...
shortcut 要活学活用。
这些东西多数在 computing mathematics 。。。。。 |
|
|
|
|
|
|
|

楼主 |
发表于 19-5-2008 09:30 PM
|
显示全部楼层
原帖由 flash 于 19-5-2008 07:01 PM 发表 
shortcut 要活学活用。
这些东西多数在 computing mathematics 。。。。。
对, 我读着computer science |
|
|
|
|
|
|
|
发表于 20-5-2008 09:56 AM
|
显示全部楼层
原帖由 晨天 于 19-5-2008 09:30 PM 发表 
对, 我读着computer science
那么参考一些 computing mathematics 的参考书应该会有你要找的资料。。。。。。 |
|
|
|
|
|
|
| |
本周最热论坛帖子
|