Data storage problems

Where is the data stored?

  A: The data is stored in a memory

So what is memory?

  Okay, I do not exactly explain. But I know what that can store data

  1. Paper (paper tape punch imagine, both instructions and data before the above code)
  2. Memory (storage medium is now a transistor (earlier there are other means of "mercury delay line memory"))
  3. Register (storage medium as transistors)
  4. hard disk
  5. Cache parts

Memory capacity problem? (Herein referred to as memory, registers)

  How much data can be stored, the need to quantify this. For example, you go to point B from A. You tell people I ran so long, so long? Ignorant force
  a memory transistor is composed of two states represents a transistor, the transistor can be represented by a set of multiple states.

  Then a transistor can store two states, called bit. There are similar B, KB, MB, GB, TB, PB, EB, ZB, YB, BB, NB, DB.

  Then to develop a conversion relationship storage unit by the chiefs. Difficult to understand? (10 mm = 1 cm, 100 cm = 1 m, provided these are people, when we all recognized this when it is the standard)

  1 Byte (B) = 8 bit (early 1Byte = 18bit)
  1 Kilo Byte(KB) = 1024B
  ....... There are a lot of self-searching.

  Memory unit is relatively generous memory division, the smallest unit is a byte Byte, then each memory cell number

Each grid is a little bit

According to the definition of big brother, Byte. 1 (B) =. 8 'bit , I hope you can understand

There are three things to consider

  1. coding
  2. Arrangement of data in the memory
  3. data range

Storage: Digital 10

  1. 10 XXX encoded digital
  2. Problems arrangement does not exist, a 256-byte expressible states, 10 <256
  3. Minimum storage memory in bytes, the byte number 10 occupies a

Storage: a character

  1. The computer is able to store two states (an electrical signal, 0 or 1, high and low), regardless of how appreciated that two states are used to express a combination of a plurality of transistors on a larger state. So the problem here is that a character can not be stored directly, we need to encode characters. After storing the encoded value. (For example, you know you want to see a red light stop, green light can be seen walking, and this is to go and stop coding.)
  2. Ditto
  3. Ditto

Storage: 300.232323

  1. coding
  2. Certainly not with a 300 byte memory, because that is one byte can only express 256,300> 256. We need two storage units (2 bytes) then there is a problem of the arrangement. In the end is 3000 or 0030? This is the end of the issue size. If little endian mode, the digital low position in the address, data in the high-high, low high memory address is assumed to be aligned then it is 0030. Instead the big end

     

   3 2 bytes

 

to sum up:

Coding (coding is not the only way, a wide variety.)

  Integer: Complement

  Decimal: float compliance is IEEE R32.24, while double compliance is R64.53.

  character:

    Letters: ASCII

    Character: GBK, GBK2312
  term:

      Garbled: Use your use of the complement encode integer, when decoding using ASCII, this phenomenon is garbled friends

         You use of GBK character encoding, decoding and the lack of use UNICODE
arranged
  size end

 

  

 

 

  

Guess you like

Origin www.cnblogs.com/binaryAnt/p/11069801.html