Jump to content

Basic computer questions


Netra77

Recommended Posts

Quote

A computer is an electronic machine that processes information—in other words, an information processor: it takes in raw information (or data) at one end, stores it until it's ready to work on it, chews and crunches it for a bit, then spits out the results at the other end. All these processes have a name. Taking in information is called input, storing information is better known as memory (or storage), chewing information is also known as processing, and spitting out results is called output.

https://www.explainthatstuff.com/howcomputerswork.html

Link to comment
Share on other sites

This is a subject that you can study for several years at university, so I don't think a few questions on a forum are going to be the best way to learn.

I suggest reading some books and finding some online courses. Then, if you have specific questions about things you don't understand, then we can help you. 

But saying "please teach me everything about <vast subject>" is not going to work.

Link to comment
Share on other sites

OK so I will try to pick up all three of your threads here, but others will probably answer as well. There are many IT savvy people here.

 

Digital computers  (there are other sorts but I won't go into them here) have what is called a central processing unit or CPU.

Inside the CPU there are a number of memory cells called registers.
These registers are organised on blocks of 2, 4, 8, 16, 32, 64 or even 128 cells.

A CPU will have several such registers.

These registers are the most important part of the computer as all the data and program instructions pass through these registers.

Most of the work of the computer consists of moving these blocks of data about, loading them into a register, performing some instruction on them, and putting them in the 'computer memory.

They are constantly flowing through the CPU.

The  blocks can come from various sources such as the keyboard. The keyboard contains its own temporary register for holding the block while the data is transferred to the CPU.

So let us assume the user has pressed the letter A and the CPU transfers this to its own register. The keyboard register is then cleared ready for the next keypress to await reading.

Meanwhile the CPU is following whatever instruction it is given to do when presented with an A.
This may be to place the A in short term memory to await the next letter or it may be to place the A where it will be displayed on the screen as an A by the screen circuitry, or even both.

Now there are several types of memory.

First we distinguish volatile and non volatile memory.

Data in volatile memory disappears when the computer is switched off, or is replaced by other data.

Data in non volatile memory remains after switchoff.

Volatile memory comprises the registers and RAM memory.
A computer has a lot of RAM memory as this is its working space and using it is much faster than hard drive technology.
Ram memory is also called read-write memory as the computer can both read the data in the memory block and write differnt data there.
This also applies to hard drive and older tape technology.

The alternative is non volatile memory.
The solid state version is called ROM or read only memory.
Hard drives are also non volatile.

More recently solid state RAM (SSRAM) has become available.
However I will leave discussion of that to a later post as economics (cost) plays a big part in the selection of memory.

The ROM holds the program that controls the computer and tells it what to do when presented with the A.

 

I will stop there for now, that is enough to start chewing on.

Come back and reply when you are ready, don't waste your last post today on it.

Edited by studiot
Link to comment
Share on other sites

  

55 minutes ago, Netra77 said:

How does computer translate human readable language to machine language as soon as we enter data??

Computer store data in bits. Bit can be 0 or 1. Sequence of 8 bits is byte. It can have values from 0...255 (because 2^8=256). Byte is also used as ASCII character (modern equivalent is Unicode which is 16 bits wide character in computer memory, and encoded in 1-4 bytes in various standards e.g. UTF-8 when it is stored in file).

In this article you will find ASCII conversion table i.e. what ASCII code corresponds to which glyph.

https://en.wikipedia.org/wiki/ASCII

e.g. word "ASCII" is sequence of bytes 65,83,67,73,73. Computer does not know the true meaning of human language words.

More information about Unicode standard:

https://en.wikipedia.org/wiki/Unicode

 

https://en.wikipedia.org/wiki/Glyph

 

Edited by Sensei
Link to comment
Share on other sites

58 minutes ago, Netra77 said:

When data is entered in computer,its actually stored in ram but actually is it dram or sram(cache memory)??or it depends upon type of computer??and also is cache memory type of sram or anything else??

The main memory in a computer can be DRAM, SRAM, flash or disk drives. These have different characteristics such as speed, power consumption, cost, size, access speed, etc. So they each have a place in different types of computer system.

Cache memory just needs to be faster than the main storage that it is used with. So data to or from a disk storage device, might be cached in DRAM (because DRAM is cheap) or flash (because it is faster than disk. but still non-volatile) or SRAM (because it is fast and can be integrated with the disk drive).

Data from DRAM is likely to be cached in SRAM (because it is faster and it is easier to integrate SRAM on chip).

 

Link to comment
Share on other sites

In a Von Newmann architecture, ALL memory is for data storage.
Whether spinning disc magnetic or optical, solid state flash, read only, random access ( static or dynamic ) or even cache memory on the processor itself. The only difference is the optimization for faster access.

All operations done by the Central Processing Unit ( CPU ) are performed through the extremely hi-speed register set, except some data movements done in Direct Memory Access ( DMA ) mode which bypass the registers. For this reason hi-power CPUs have a lot of wide ( 64 or 128 bit ) registers.
Some very simple mathematical operations can be performed by a 'shift register', where the bits are shifted one place right, or one place left, but most operations are performed by the Arithmetic and Logic Unit ( ALU ), which operates on the data from two registers ( operands ) to discharge into a third register ( result ). For more detailed information on how the ALU operates on register data see

https://en.wikipedia.org/wiki/Arithmetic_logic_unit

 In early processors the operations were performed by logic gates, and to a large extent, still are in Reduced Instruction Set ( RISC ) CPUs, at the rate of one instruction per clock cycle, but modern processors usually use micro or nano code engines, where the complex instruction is sent to an even smaller engine within the ALU which decodes/performs these instructions; through optimization, an instruction which might have taken 6 individual hardwired instructions ( and 6 clocks ), can be decoded/processed in 3 microcoded instructions, and only 3 clocks.

Link to comment
Share on other sites

22 minutes ago, MigL said:

In a Von Newmann architecture, ALL memory is for data storage.

And, just to avoid confusion, some of that data can be interpreted as instructions to execute. (The lack of a distinction between code and data leads to several security vulnerabilities which need to be tackled in various ways in hardware and software. I don't suppose that ever occurred to those developing the first computers.)

Link to comment
Share on other sites

4 hours ago, Netra77 said:

If anyone have time,can anyone tell me how computer process program??if possible plz tell me from beginning

How much do you already know?

When you say "from the beginning" do we need to start with voltage, current flow and basic electronic components?

Or can we assume you know about transistors? Or logic gates? Binary arithmetic? Machine code? Instruction sets? Compilation and optimization techniques? Sorting algorithms? Machine learning?

Where is "the beginning"?

Link to comment
Share on other sites

2 hours ago, Strange said:

And, just to avoid confusion, some of that data can be interpreted as instructions to execute. (The lack of a distinction between code and data leads to several security vulnerabilities which need to be tackled in various ways in hardware and software.

Feature for good guys. Vulnerability for evil guys.

Dynamic generation and/or modification of the code to execute is state-of-the-art way to accelerate execution of the code. e.g. JIT.

https://en.wikipedia.org/wiki/Just-in-time_compilation

With memory protection for code, JIT becomes much more complicated than it can be in the normal circumstances (without "evil guys").

Quote

I don't suppose that ever occurred to those developing the first computers.)

They had code on paper tape, equivalent of non-volatile ROM.

Edited by Sensei
Link to comment
Share on other sites

Is register part of ram memory?i have known that when we entered data then at first it gets stored in ram and then cache memory transferred it to different part of register and then cpu extract instruction of data from register and performs operation by alu ,is this things right ??is there any kind of mistake

Link to comment
Share on other sites

  • Strange changed the title to Basic computer questions
24 minutes ago, Netra77 said:

Is register part of ram memory?i have known that when we entered data then at first it gets stored in ram and then cache memory transferred it to different part of register and then cpu extract instruction of data from register and performs operation by alu ,is this things right ??is there any kind of mistake

!

Moderator Note

Please keep all your questions about computer architecture in this thread.

 
24 minutes ago, Netra77 said:

Is register part of ram memory?i have known that when we entered data then at first it gets stored in ram and then cache memory transferred it to different part of register and then cpu extract instruction of data from register and performs operation by alu ,is this things right ??is there any kind of mistake

No, registers are not part of memory. They are storage inside the CPU. They are typically 1 word wide and used for arithmetic and logic operations on data.

Instructions are not usually stored in registers. They are read from memory and executed. Instructions do things like: read data from memory into registers, write data from registers to memory, move data between registers, perform operations on data in registers or jump to another instruction.

Link to comment
Share on other sites

2 hours ago, Netra77 said:

Is register part of ram memory?i have known that when we entered data then at first it gets stored in ram and then cache memory transferred it to different part of register and then cpu extract instruction of data from register and performs operation by alu ,is this things right ??is there any kind of mistake

Instruction is special data in computer memory. Program is sequence of instructions.

CPU reads instruction from address specified by special register with name PC (Program Counter). (Read articles below)

https://en.wikipedia.org/wiki/Program_counter

After reading it, CPU starts executing assigned to instruction operation and PC is incremented by length of the all arguments taken by instruction (it is variable in the most of CPUs and depends on instruction).

Different CPUs have different instruction sets. The same value might mean something else (different operation) depending on which CPU is used. Therefore program compiled to one processor is not working with different processor or with different architecture (see below). Even the most basic ANSI C complaint program, requires recompilation if intended to be used on different CPU.

There is yet another special kind of register: CPU flags register.

https://en.wikipedia.org/wiki/FLAGS_register

The most important (and common to the all modern processors) are: Zero, Carry, Overflow and Negative flags.

https://en.wikipedia.org/wiki/Zero_flag

https://en.wikipedia.org/wiki/Carry_flag

https://en.wikipedia.org/wiki/Overflow_flag

https://en.wikipedia.org/wiki/Negative_flag

These allow computation and comparison of data by instructions.

For instance, to check whether one data is equal to another data there is used virtual subtraction of them. Result is lost, nowhere stored, but flag register is updated instead.

if data are equal subtraction of them gives zero, therefore Zero flag is set, and BEQ or BNE instructions (or equivalent with different name) can be used to perform jump. B.. is shortcut of Branch, J... is shortcut of Jump. EQ = EQual. NE = Not Equal.

Relative jump means addition or subtraction of PC register.

Absolute jump means setting PC register to fixed value (address of the next instruction to execute).

 

Read articles:

https://en.wikipedia.org/wiki/Instruction_set_architecture

 

Edited by Sensei
Link to comment
Share on other sites

3 hours ago, Netra77 said:

Is register part of ram memory?i have known that when we entered data then at first it gets stored in ram and then cache memory transferred it to different part of register and then cpu extract instruction of data from register and performs operation by alu ,is this things right ??is there any kind of mistake

I see that you have lots of knowledgeable answers. +1 sensei.

Before answering this, I would like to make two points.

Firstly it would be helpful to tell us where you are in your studies of this.
Are you in school or colllege studying some form of computer science and is the establishment shut because of the virus ?
Is this the beginning of your course?

Secondly in computer science there is something known as the 'layer model'.
This allows people to concentrate on a relevent part of the whole.
It makes the study easier and more manageable.

Here is a link to the model applied to data processing.

https://www.bmc.com/blogs/osi-model-7-layers/

 

Applying the model to computer architecture separates the electronics theory (at the bottom) from the hardware (next) to bus structure to the data structure to the input/output structure and so on.

It is good to have such an overview map of things to talk about and relate to.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.