周易與二進制

蘋果花的老公
Join to follow...
Follow/Unfollow Writer: 蘋果花的老公
By following, you’ll receive notifications when this author publishes new articles.
Don't wait! Sign up to follow this writer.
WriterShelf is a privacy-oriented writing platform. Unleash the power of your voice. It's free!
Sign up. Join WriterShelf now! Already a member. Login to WriterShelf.
658   0  
·
2017/10/03
·
1 mins read


昨天上了數學邏輯

講課的內容為二進制

什麼是二進制

在所有的電子計算機所使用的基本上都是二進制

其實就是所謂的0和1

也是真和假

更是中國古老傳說的陰與陽

有時候還真的不能不佩服中國的老祖宗有就是周易

可以說吧二進制發揮到了極致

相信大家應該有讀過

易有太極=2的0次方

始生兩儀=2的1次方

兩儀生四象=2的2次方

四象生八卦=2的3次方

在這樣的概念底下

如果我們要把一個十進位的數字轉換成二進制將會如何做呢

我們知道一個數值為4820

我的做法跟程序如下

4096=2的12次方

4820-4096=724

512=2的9次方

724-512=212

128=2的7次方

212-128=84

64=2的6次方

16=2的4次方

4=2的2次方

Ans: 0001 0010 1101 0100

當然還有另外一個做法就是一直除2

因為這樣的做法有點複雜

所以我在此並不想多做解說

以上是我對這一堂課的心得


WriterShelf™ is a unique multiple pen name blogging and forum platform. Protect relationships and your privacy. Take your writing in new directions. ** Join WriterShelf**
WriterShelf™ is an open writing platform. The views, information and opinions in this article are those of the author.


Article info

分類於:
標籤:
合計:274字


Share this article:



Join the discussion now!
Don't wait! Sign up to join the discussion.
WriterShelf is a privacy-oriented writing platform. Unleash the power of your voice. It's free!
Sign up. Join WriterShelf now! Already a member. Login to WriterShelf.