Notes 1_ algorithm, programming, language, etc. _ Harvard _ Computer Science Cs50_david J. Malan

Source: Internet
Author: User

1. Starting from 0 count, not 1 reason

The digital system is simplified to the basic idea of only 0 and 1, both 0 and 1 occupy a number of digits, all with its associated weights. Naturally, we start counting from 0. Otherwise, a bit is wasted.

Bit (bit) is a shorthand for binary digit, from 0 to 1 digits, while BI represents 2. So there are two numbers, so BIT was born.

ASCII code that can represent characters on the keyboard.

The 8 bit is a byte that can represent 256 possible characters and can contain characters from the entire American keyboard, including uppercase and lowercase letters and a series of punctuation. For other languages, there are other coding systems when more characters are involved.

When you tap the letter A on the keyboard, 01000001 in the computer's binary storage indicates that a is typed.

Ram temporarily stores the programs and files that are in use and speeds up the computer; hard drives are places where programs and files are stored permanently


2. Why the computer uses binary

Mainly because when we use a physical machine to run the computer, the binary is easy to use the concept of open or off to express.

A computer's hard disk is just a big iron container, which consists of a number of disks, these metal boards and all of them are invisible small magnetic particles, if you touch them or open the hard disk to get it, you destroy it, because changes in their order, the data is corrupted. A magnetic particle can easily represent 0 or 1, as long as one has a polar magnetic object. The computer hard disk is completely a bunch of magnetic particles arranged in this way.

The hard drive is a where your PC stores most of its permanent data. To do, the data travels from ARM along with software signals, that's the hard drive how to store that data. The hard drive dircuits translate those signals to voltage fluctuatios. These in turn control of the hard drive ' s moving parts. Some of the few moving parts left in the modern computer. Some of the few moving parts left in the modern computer. Some of the signals control a motor which spins metal-coded platters. Your data is actually stored on these platters. Other signals move the read/write heads to read or write data on the Platters. This machinery are so precise a human hair coudn ' t even pass between the heads and spinning platters, yet it all works In terrfic speeds.

3. How to convert the electromagnetic signal to 0 and 1

When a brief pulse of electricity are sent to the Read/write head it flipson a tiny electromagnet for a fraction of a se Cond. The magnet creates a field which changes the polarity of a tiny, tiny portion of the metal particles which coat each Platt Er ' s surface. A patterned series of these tiny  charged berries on the disk represents a single bit of data in the binary number sy Stem used by computers. Now, if the current is sent one-through the Read/write head, the area was polarized in one direction. If the current was sent in the opposite direction and the polarization is reversed. 

How do I get data off the hard disk? Just reverse the process. So as the particles on the disk that get the read/write head moving put together millions of these Magnetiz Ed segments and you ' ve got a file. Now, the pieces of a single file is scanning all the hard drive's platters, patterns--the mess of papers on your desk. The special active file keeps track of whatever you missed.

4. What happens when a floppy disk or hard disk is formatted?

In fact, nothing has changed. Formatting or partitioning typically modifies only a few or thousands of bytes of valuable information. The end result is that the computer doesn't know where the files or folders are stored, but the bytes that make up the files are still in place.

5. About defragmentation

Hard drives sometimes need to do this, because when you start to read and write to the hard drive, save a file to disk somewhere, the modern operating system allows file block processing, the final file becomes fragmented, the operating system according to the address of the file, can find the address of the file, which also led to the potential speed slowed. With hardware performance so good today, fragmentation is not so important.

6. Read the data in the disk

The hard drive has a circuit board, so it knows how to move up and down, install the driver software on the computer, and the operating system can know how to communicate with this hardware by driving the software. Because of this driver software, the operating system can be based on the data in the disk storage situation, by sending up and down to move around the instructions to read the data on the disk

7. The advantages and working principle of solid State Drive (SSD)

SSDs are the direction of development and SSDs are like Compact Flash or SD cards. In the past few years we have been able to deposit gigabytes in the camera's storage device, even in the future. There are no moving parts in the device, generally speaking, these devices are accessed more quickly because they do not have moving parts. Even if a hard drive speeds up to 7,200 times per minute, even faster, it is still slower than the speed of light. So, when you have a device, whether it's pure electronics or not, the data bits can't be transmitted at the speed of light in the real world, which is too fast for a device.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Notes 1_ algorithm, programming, language, etc. _ Harvard _ Computer Science Cs50_david J. Malan

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.