佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1641|回复: 6

Base and Number Representation

[复制链接]
发表于 19-5-2008 01:33 PM | 显示全部楼层 |阅读模式
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
回复

使用道具 举报


ADVERTISEMENT

发表于 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
回复

使用道具 举报

Follow Us
发表于 20-5-2008 09:56 AM | 显示全部楼层
原帖由 晨天 于 19-5-2008 09:30 PM 发表


对, 我读着computer science



那么参考一些 computing mathematics 的参考书应该会有你要找的资料。。。。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 2-8-2025 11:51 PM , Processed in 0.125357 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表