Dive in to the hardware of a computer

In summary, the conversation discusses the process of how a code written in C language is converted to voltage signals inside a flipflop, and how the text file with 1s and 0s is converted to voltage changes. It also mentions the role of gates and wires in controlling the pathways and outputs of a CPU, and how computer hardware can be built using simple components. Assembly language and C language are mentioned as abstractions of machine code, with C being a higher level abstraction.
  • #1
ncd5883
3
0
dear all,
I am not a electronic engineer. i want to understand the basics in which a code written in C language gets
converted to voltage signals inside the flipflop(transistor). basically when i write x=3+4,print x through a C language, what happens inside the hardware? I know the x=3+4 is converted or compiled to 1 and 0 as a text file. how the text file 1 and 0 goes inside as voltage changes. i know i get into the depth, but someone can throw light.

thanks
ncd
 
Computer science news on Phys.org
  • #2
You are basically asking us to inform you of the contents of several full-semester college courses. I'm a speed typist but that's a bit too much even for me.
 
  • Like
Likes Greg Bernhardt
  • #4
You have a cpu clock running that produces a square wave of high and low votage. At each rising edge, the wires coming out of the clock become hot, and voltage travels through the circuitry. In the circuitry are various gates which can either allow current through or not depending on which inputs are hot. For example, you may have a gate in which a signal is let through unless 2/2 input pins are hot. That would be a nand gate, which is well known because nand is logically complete, i.e., you can make any logic circuit with just wires and nand gates.

When you run machine code, the code is in memory, in the form of high or low voltages; It's in the mix of this complex dance of voltages flying through gates and wires. The outputs in the memory, connected to wires, and then to gates, can control which pathways are activated and therefore what the CPU does, as well as what it does it with.

When a number is sent to the ALU, it's represented as a set of high or low voltage wires fed into input pins. Using control signals ( fetched from memory the machine instructions in memory ), you can change which paths these voltages take, for example to multiply two numbers, the control signal activates the paths for multiplication, the signals representing the numbers are routed accordingly, and the output is the resulting high and low voltages on the output pins.

We can build computer hardware much like we build programming languages. Complex computer systems are really made from simple components. We can treat a component as a black box that has a simple well defined behavior and forget about how it works, even though it is actually made up of many other components.

Assembly language is an abstraction of machine code in a form more feasible to work with by human beings. It translates into machine code, which are just ones and zeros ( really high and low voltages in some memory module ). C is a high abstraction of assembly language just like assembly language is an abstraction of machine code.

This is really simplified, and I didn't talk about how memory works or the specifics of the CPU and other components, but it basically summarizes how computers work.
 
Last edited:
  • Like
Likes MrWarlock616, CalcNerd, Silicon Waffle and 1 other person

1. What is the purpose of a computer's hardware?

The hardware of a computer is responsible for executing instructions and performing tasks. It includes components such as the processor, memory, storage, and input/output devices.

2. How does the processor work in a computer?

The processor, also known as the central processing unit (CPU), is the brain of a computer. It executes instructions and performs calculations, allowing the computer to carry out tasks and run programs.

3. What is the role of memory in a computer?

Memory, also known as RAM, is used to store data and instructions that are currently being processed by the CPU. It allows the computer to access and retrieve information quickly, improving its overall performance.

4. What types of storage devices are found in a computer?

There are two main types of storage devices in a computer: hard disk drives and solid-state drives. Hard disk drives use spinning disks to store and retrieve data, while solid-state drives use flash memory. Both types of storage are used for long-term data storage.

5. How do input/output devices interact with a computer?

Input devices, such as keyboards and mice, allow users to input data and commands into the computer. Output devices, such as monitors and printers, display or produce the results of the computer's processing. They allow for communication between the user and the computer.

Similar threads

Replies
8
Views
2K
Replies
14
Views
2K
Replies
3
Views
1K
  • Computing and Technology
2
Replies
44
Views
3K
  • Programming and Computer Science
Replies
29
Views
2K
  • Computing and Technology
Replies
4
Views
2K
Replies
16
Views
2K
  • Programming and Computer Science
Replies
5
Views
1K
Replies
10
Views
2K
Back
Top