MMGames Introduction to C C Language Development Environment C language now Useful Apps Contact Us

Automatic version identification


It's easy to tell by looking at it.

Response Time Checker

I can leave my computer on and do it.

Mouse cleaning time

I can leave my computer on and do it.

Mouse cleaning time

C language learned by suffering
C language learned by suffering

Memory Mechanism

The word memory is familiar to anyone interested in computers.
It is in this memory that the computer's data is stored.
Even those who are not familiar with computers have heard of them.

That's enough for the average person's computer knowledge.
When programming, it is not enough.
How does memory store data?
It is necessary to have a solid understanding of this.

That said, I have no intention of explaining the structure of CMOS.
What is important is not the hardware mechanism, but the software concept.
What kind of mechanism does memory use to store data?
And I will explain in what way memory is handled in the program.
Super huge single row lockers
There are so many electronic components built into the memory that
Each one of them has its own state of being.
state, i.e., on or off.

And if the state of the electronic component is on, it's a 1, if it's off, it's a 0, and so on.
Each component remembers whether it is a 1 or a 0.

This structure is, to use an analogy, like a very large single-row locker.
The number cannot be more than a sensible number, such as 10 or 100.
A computer with 64 MB of memory would have over 500 million lockers in a row.

And those lockers are numbered.
Each locker also has a status of luggage.
Count as 1 if there is luggage in the room and 0 if there is no luggage in the room.

The computer will fill this locker with luggage and memorize the numbers.
All numbers are stored as a combination of 1s and 0s.
In short, computers store numbers in binary.
Bits of CPU
You have probably heard of the word " bit" as well.
The computers we use today are 32-bit.
Right now (at the time of writing), there's a lot of talk about AMD's 64-bit CPUs.
It will be a long time before we, the general public, will be using them.
**As of 2017, 64-bit is the norm*.

By the way, what exactly are these bits?
In fact, it is very closely related to memory, which is the theme of this issue.

Earlier, we explained that memory is a very large single row locker.
I then explained that the numbers are recorded as binary numbers.
But since all this data is recorded in binary numbers, it's not
It is very troublesome to exchange data one by one.

So, everyone comes up with a way to use several of them at once.
For example, if you were to group eight of the data in memory together, you could use
Binary numbers in the range 000000000000 to 1111111111, i.e.
In decimal, it can be calculated using numbers in the range 0-255.
This seems like a pretty decent calculation.

As some of you may have already noticed, you are right.
The number of binary digits of memory that the CPU handles at one time is the number of bits.
When a CPU says something like how many bits, it usually means that.
However, some CPUs can calculate more than that number of bits at once with special instructions.

Note that one bit means one binary digit.
In the case just described, this means that the processing unit of the CPU is 32 bits.
32-bit locker
We have explained that the CPU handles several pieces of data in memory at once.
And most current computers handle 32 at a time.
This is why we call them 32-bit computers.
From this point forward, we will proceed on the assumption that these 32 bits are used.

A 32-bit computer handles 32 pieces of data at once.
In other words, a very large single-column locker can be used to sort 32 pieces at a time.
In reality, however, they are sorted into eight pieces, each numbered.
Segmenting data into 8 pieces each means that memory is handled in 8-bit units.

Eight bits, also known as a byte, is the basic unit of measurement in computers.
This is because 8 bits are convenient for handling a variety of data.
Because 8 bits can represent a number from 0 to 255, they are ideal for storing relatively small numbers.
Also, for computers that operate in binary numbers, 8 bits is a good place to start.

Because of these circumstances, the actual handling of memory in a computer is
The lockers are grouped into eight units of eight lockers each, and the numbers are assigned as one unit of eight lockers.
In 32-bit computers, this is assigned a number within the 32-bit range.
Within 32 bits means, in other words, in binary

and can handle 8-bit numbers up to about 4.2 billion in decimal.

About this Site

The C language (bitter C), which is learned by suffering, is
This is the definitive C language introductory site.
It systematically explains the basic functions of the C language and
It is as complete as or better than any book on the market.

Part 0: Program Overview
  1. What is the program?
Chapter 2: How to write a program
  1. Writing Rules
  2. Writing conventions
  3. Exercise 2
Chapter 3: Display on Screen
  1. String display
  2. newline character
  3. Exercise 3
Chapter 4: Numeric Display and Calculation
  1. Numeric Display
  2. Basic Calculations
  3. Type of value
  4. Exercise 4
Chapter 5: Numerical Memory and Calculation
  1. Memorize values
  2. Variable Type
  3. Type conversion
  4. Numeric justification
  5. Exercise 5
Chapter 6: Input from the keyboard
  1. Functions for input
  2. Fear of Input
  3. Exercise 6
Chapter 9: Repetition with a fixed number of times
  1. Sentences that repeat themselves
  2. Loop Operation Mechanism
  3. Exercise 9
Chapter 10: Unknown number of repetitions
  1. Loop of unknown frequency
  2. input check
  3. Exercise 10
Chapter 13: Handling Multiple Variables at Once
  1. Multiple variables are handled together.
  2. How to use arrays
  3. Exercise 13
Chapter 19: Dynamic Arrays
  1. Create arrays at will
  2. Exercise 19
Chapter 20: Multiple Source Files
  1. Minimal division
  2. The Stone of Partition
  3. Exercise 20


Open the 💬 comment submission box