So we've seen one example of this, this idea of walking through all the integers looking for the square root.
现在计算机速度很快了,我可以把这个数字设的更大点,计算机会去很快的做这个事情。
But we know already from week zero that computers ultimately represent all information with numbers, and if they want to represent letters inside memory, well what do they do or what do they use?
但是自从上周我们已经知道,计算机最终是用数字来表示所有的,信息,如果它们要描绘,在内存中的字母,它们该怎么做,用什么方式呢?
You just need to come up with a convention that maps the numbers that are very easy for a computer to store.
你只需要提出一个使之与数字对应的协定,那样计算机就可以方便地存储它们。
A If you want to convert a number like 65 to the letter A, you just have tell the computer "cast that int to a char."
如果你要把一个像65这样的数字转换为字母,你只需要告诉计算机“把那个int型数据转换成char型处理“
应用推荐