How does a computer program actually work?

In summary, the physical path an electrical signal takes on its journey depends on a variety of factors, including the type of keyboard, computer, operating system, and more.
  • #1
jaydnul
558
15
I really want to know the physical path an electrical signal takes on its journey. For example, when i press the J key on my keyboard, an electrical impulse is sent where? to the hard drive where the keyboard program is stored? Could someone just give me all the stops that electrical signal will take in order to be eventually displayed as a J by the pixels on my screen? Thanks a bunch
 
Engineering news on Phys.org
  • #2
There is no single electrical signal that conveys the J key on the keyboard to the J shown on the display. In fact there are thousands of electrical signals involved. The dirty details of the sequence of all of these signals needed to perform this seemly simple act is what computer/electrical engineers learn getting their degree.

Many of these signals are inside of integrated circuits (processor memory etc.).
Many are on the motherboard (address/data lines), USB lines, interrupts.
Many are within the keyboard itself (inside microcontroller and on keyboard motherboard).

And it depends on stuff like:
What kind of keyboard (traditional, USB, wireless).
What kind of computer (Apple, PC, Sun workstation, Ipad)
Which operating system (Linux, Microsoft).
 
  • #4
lundyjb said:
I really want to know the physical path an electrical signal takes on its journey. For example, when i press the J key on my keyboard, an electrical impulse is sent where? to the hard drive where the keyboard program is stored? Could someone just give me all the stops that electrical signal will take in order to be eventually displayed as a J by the pixels on my screen? Thanks a bunch

Here is some reading that you should check out at HowStuffWorks.com:

http://www.howstuffworks.com/pc.htm

.
 
  • #5

A computer program is a set of instructions or code written by a programmer to perform a specific task. When you press the J key on your keyboard, it sends an electrical signal to the computer's processor. The processor interprets this signal and executes the corresponding code for the J key, which is typically stored in the computer's memory. The code may include instructions to display the letter J on the screen, so the processor sends a signal to the graphics card. The graphics card then converts the signal into pixels and sends it to the display monitor, which ultimately displays the letter J on the screen.

The exact path that the electrical signal takes may vary depending on the specific hardware and software configuration of your computer. However, generally, the signal will travel from the keyboard to the processor, then to the memory, graphics card, and finally to the display monitor. It is important to note that modern computers are extremely complex and have multiple components working together to execute a single task, so the signal may also travel through other components such as the motherboard and input/output devices.

In summary, a computer program works by interpreting and executing code to perform a specific task, and the physical path of an electrical signal involves multiple components working together to display the desired output on the screen.
 

1. How does a computer program actually run?

A computer program is a set of instructions that tells a computer what to do. When a program is executed, the computer reads the instructions one by one and performs the actions specified in the program. This process is known as the "execution cycle".

2. What is the role of programming languages in computer programs?

Programming languages are used to write computer programs. These languages use a specific syntax and grammar to communicate with the computer and give it instructions. They allow developers to create complex programs by breaking down tasks into smaller, more manageable pieces of code.

3. How does a computer program turn code into actions on a computer?

When a computer program is written, it is first converted into machine code, which is a series of 0s and 1s that the computer can understand. This process is called compilation. The computer then executes the machine code, which tells it exactly what actions to perform in order to carry out the program's instructions.

4. What are the different components of a computer program?

A computer program typically consists of three main components: input, processing, and output. Input is the data that is provided to the program, processing is the manipulation of this data, and output is the result of the processing. Programs may also have additional components such as variables, loops, and conditional statements to control the flow of the program.

5. How are bugs and errors handled in computer programs?

Bugs and errors are inevitable in computer programs, and they can occur due to various reasons such as typos, incorrect syntax, or logical errors. To handle these issues, developers use debugging tools to track down and fix errors in the code. They may also use techniques such as testing and code reviews to identify and prevent bugs in the first place.

Similar threads

  • Science and Math Textbooks
Replies
2
Views
1K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Replies
1
Views
907
Replies
6
Views
933
  • Electrical Engineering
Replies
26
Views
6K
  • Computing and Technology
Replies
32
Views
981
  • Biology and Medical
Replies
9
Views
2K
Replies
1
Views
813
  • Programming and Computer Science
Replies
29
Views
3K
  • Programming and Computer Science
Replies
17
Views
1K
Back
Top