# Basic knowledge of C Language

Source: Internet
Author: User
Tags arabic numbers

This is the first chapter of my C language textbook. It consists of two parts: Computer composition and working principle, and information digitization. if you have any shortcomings, you can add them or make some suggestions.

Second, the data storage computer is best at storage, and storage is also the soul of the computer, so this tutorial is closely centered around storage, understand and master the storage, you basically understand how to write a program. We just talked about how to store data in the memory. What kind of data can we store? How is it stored? 1. the storage of numbers here refers to the number that represents the size in our calculation. We are used to decimal representation. Computers can only store binary numbers, we can convert it to the corresponding binary number for storage. For example, 254 11111110 is usually written as Fe 5 00000101 05 1) hexadecimal conversion: 1. N: A decimal method: the following equation can be understood by everyone. 3679 = 3*103 + 6*102 + 7*101 + 9*100 this is the calculation method of the decimal number. For the number of N in hexadecimal notation, replace 10 with N, so remember this equation, any hexadecimal to 10 hexadecimal will be done. For example: 10011001 is the binary number converted into a 10 hexadecimal number, that is, 1*27 + 0 + 0 + 1*24 + 1*23 + 0 + 0 + 1*20 = 128 + 16 + 8 + 1 = 153 2. convert decimal to n-base: as before, think about how to find the value of each digit in the 10-base number, 3679/10, more than 9, more than 9, more than 9, more than 367, more than 7, more than 367/10, more than 6, more than 3, more than 3, more than 3, more than 0, and more than 3, divide by 10, the remainder is the lowest number of digits, and then the user is divided by 10. The result is that the remainder is the last digit. The remainder is deleted until the end of the quotient is 0. Error-prone: when dividing 260 by 16, another formula is displayed. The two formula is very similar, and it is easy to confuse accidentally. 3. hexadecimal, Binary Conversion Method: hexadecimal-> binary 1-bit to 4-bit, not 4-bit, front side to zero such: 104-> 0001 0000 0100 Binary-> hexadecimal 4-bit to 1-bit, for example: 101 1100-> 5 C

Related Keywords:

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.