And so when we say something is exponential, we're talking about in terms of the number of bits required to represent it.
所以当我们说某些东西,是指数增长的我们指的,就是代表它的比特数。
int So, primitive type besides those three types, we have ints which are just integers which are similarly 32 bits.
除了这三种类型外,还有一种最原始的数据类型,32比特整数。
To speak both of Jove and of Christ is obviously in some ways to mix your metaphors and the effect can only be disorienting.
同时提到丘比特和救世主在某种方式上,很明显使人们对暗喻和其所起的作用感到迷惑。
to the n, every value in the 1 bit vector we looked at last time is either 0 or 1. So it's a binary n number of n bits, 2 to the n.
从2到n,我们上次看到的,位向量的每个值不是0就是,所以它是n,比特的二进制数,从2到。
But because you only have a finite number of bits, the takeaway for today is that there's only so much precision.
因为只有有限个比特,今天的重点就是,它就这么点精度。
Well, this is just a way of saying not bits, but units of eight bits at a time.
好,这里可能不用说比特,而是说以八个比特为单位的字节。
Well one bit, really not all that useful, two bits still not all that useful. Eight bits?
一个比特不那么有用,两个也不那么有用,八个比特呢?
Starting to get useful because, in fact with eight bits can you implement things like this?
八个比特开始有用,这是因为使用八个比特你可以实现像这样的东西?
And as in all of these early lyrics, Jove conventionally throughout the Renaissance is used as a name within these classical fictions to signify the Christian God.
在早期的抒情诗里,贯穿文艺复兴的始终,丘比特在传统意义上意在,在众多的古典神话中,使上帝意象化,符号化。
So with eight bits can you express 256 possible characters?
用八个比特你就可以表达256个可能的字符?
Up to this point, the Christian God has been referred to as Jove.
直到他出现之前,基督上帝都以丘比特的名字来提及。
What is the most efficient way to store a million 32-bit integers?
存储一百万个32比特整数的,最有效的方法是什么?
Otherwise, you're wasting a bit, so to speak, unnecessarily.
否则,你就浪费了一个比特位,也就多余了。
> So 8 bits, aka 1 byte.
>,8比特,即1个字节。
char Here is the char, here is the char, how many bits did we say each of these squares is?
这是一个char,这是一个,那么这里的一个方框几比特呢?
This is convention, so on almost-- and most any computer you overuse, if you're writing code that uses a char, you're gonna be handed 8 bits or 1 byte to store that particular char.
这是约定,对于大多数-,电脑,当你写代码要用到一个char型数据时,必须先预留8比特或1字节,的空间来存储这个char型数据。
So if I have 32 bits, each of which can be a 0 or 1, that's two possibilities for every place, so 2 to the 32, that's 4 billion.
如果有32比特的话,每个比特都有0或,两种可能性,所以是2的32次方,也就是40亿。
So it's 2 to the 32, 'cause remember a bit is a 0 or 1.
就是2的32次方,因为1比特只能表示0或。
And just to plant this seed with 32 bits, what's the biggest number you can represent?
而对于32比特,所能表示的最大的数是多少?
So, a 32 bit of float gives you a bunch of precision.
2比特的浮点型数据精度更大。
This is useful especially when we get to details like forensics and looking at data on a hard drive, - 'cause if you don't know how much store-- how many bits are composing your file, you're never gonna recover that data or be able to access what you're looking for.
这是很有用的,尤其是在法庭上,查看硬盘驱动器里的数据时,如果你连-,文件有多少比特都不知道,你如何去恢复数据,获取你想要的信息呢。
I now have eight columns, though sloppily written there, eight columns or 8 bits.
我现在有八个位数,尽管写的凌乱,就是八个位数或八个比特。
The bits, the zeros and ones that compose the library are actually - in that file called cs50.c but those bits live or-- even that's a white lie.
这些构成该库的比特--0啊1啊,却是在cs50,c文件里,这些源代码-,可以说是根本不存在。
And a bit, B-I-T, just a shorthand for binary digit, 2 so a digit of zero over a one, bi means two, you only have two digits.
比特,B-I-T,是binary,digit的简写,从0到1的数字,而bi表示,所以你就只有两个数字。
Now a float is not 1 byte, it's 4 bytes, or 4 times 8, 32 bits.
而float就不只1字节了,它占据4个字节,或者说32比特。
So a char size is 1 byte or 8 bits.
一个char型数据占据1字节或8比特。
But if you've looked at more recent or if you've looked at friends who relatively recently signed ID up for Facebook, their profile IDs which you sometimes see in the URL are actually pretty long and that's because I believe at some point they did transition longlong to 64-bit values which tend to be called long longs.
但是如果你看过最近的【听不见】,如果你访问了最近在Facebook上留言的朋友,你会发现,可以从URL上看到他们的配置文件,很长很长,那是因为,可能在某个时间点,他们已经过渡到,64比特了,也就是所谓的。
应用推荐