hjr-assembly: Address and data

Source: Internet
Author: User

Note: For the computer, the following numbers are represented in 2, for we humans are represented by the 16 binary

Address: 0,1,2,3 .... Back to the line, this serial number is the address

Data: 10,100,1000 This number is the data

Data is stored in the address

Address Length: Indicates the number of rows

Address width: That is, each address number can hold the size range of the number

For example, address 0, this is the address.

Address 0 can hold a number, the number range is 0-255, then the width of address 0 is 255

How many cups of cup do we often say?

255 equals 2 of 8 power, so is 8 bit CPU, in short, is to see the address width is 2 power several times, is a few wide

Second, we often say that the size of the memory is so come

One byte equals 8 bits, and the bits above are equivalent to the 8 bits here.

Then 1kb=1024 bytes, 1m=1024kb,1g=1024m

So, the memory size is the first number of address number * bit width =? bit

Then convert the bits into kb,m,g and other units.

The type of data we've been talking about is like this.

When we use the program to apply for memory, it is generally not possible to say how many bits or bytes of memory to apply, usually using Int,float to define the variable length, so the math

The defined decimal number, the length of the integer represents how many bits are stipulated, and we write int,float directly to apply the corresponding digits automatically, these are the data types

Add the difference between the address and the pointer

At the address, the pointer is the data type, the value is the address


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.