笔记:udacity计算机科学导论- 课程11/19 python取幂, DRAM 存储原理、容量、速度

来源:互联网 发布:淘宝开店考试答案2015 编辑:程序博客网 时间:2024/06/05 10:35

求a的n次幂/方,在python中,仅用2个星表达,如2**10表示2的10次方。神奇!

如在课程中说道:"In Python we can do exponentiation by using a star star. This is what we would write mathematically as to to the power 10. So 2 to the power 10 is 1024.”


1 KB = 2 ** 10

1MB = 2 ** 20

1GB = 2 ** 30

1TB = 2 ** 40

1byte = 8 bits(light switch)


2GB = 2**30 * 2 *8 ~ 17billion light switches


DRAM的读写延迟latency大概是12 nanoseconds/纳秒,1纳秒 = 10亿分之一秒

阅读全文
0 0
原创粉丝点击