How software performs functions through hardware...

Post questions or suggestions here.
Locked
User avatar
Ryan Rudolph
Posts: 2490
Joined: Sun Jan 29, 2006 10:32 am
Location: British Columbia, Canada

How software performs functions through hardware...

Post by Ryan Rudolph »

This is something I've been wondering for quite some time, and I know there are gaps in my understanding, so I'll share what I believe takes place, and if you want to add to my description or correct something, feel free:

Software functions by making mathematical requests through the hardware, and the hardware responds, allowing the output to produce the desired outcome for the software. Moreover, mathematical requests travel as electrical currents through a complicated web of interconected transistors. The transistors aim is to amplify, and logical push current through different gateways, resulting in different mathematical results, the results continue to move through the process, resulting in a complicated series of mathematical calculations, This allows the initial input request to be transformed into a much more powerful amplified output response that allows the software to perform some action. Moreover, The CPU takes all input requests, performs electrical calculates through transistors, and sends the results back, resulting in the software performing the desired task.
User avatar
Diebert van Rhijn
Posts: 6469
Joined: Fri Jun 03, 2005 4:43 pm

Re: How software performs functions through hardware...

Post by Diebert van Rhijn »

Ryan Rudolph wrote:The transistors aim is to amplify, and logical push current through different gateways, resulting in different mathematical results
The transistor's aim within a computer circuit at least would be to function as switch or gate. A combination of gates can perform logical functions, like playing with light-switches all connected to the same lamp.

The word is perhaps: control. One can influence one current with another current, amplify or diminish, on or off, thereby weaving a logical network by feeding output current back into the circuit. A network which can contain information as well as simple algorithms (like addition) which can be connected together to form more complex algorithms (like multiplication or division).

Amplification is in itself more of use in various types of instrumentation, to enhance or modify signals in an analogue fashion.
User avatar
Ryan Rudolph
Posts: 2490
Joined: Sun Jan 29, 2006 10:32 am
Location: British Columbia, Canada

Re: How software performs functions through hardware...

Post by Ryan Rudolph »

Diebert,
A network which can contain information as well as simple algorithms (like addition) which can be connected together to form more complex algorithms (like multiplication or division).
This was always the part that I had difficulty imagining Diebert. I know that transistors create mathematical results through these logical gateways, and by controlling electrical current through switching as you say. I can visualize that part, But how does the result of an electrical pathway convert into a digit 0 or 1? And is it the mathematical results that do the work of software?
User avatar
Diebert van Rhijn
Posts: 6469
Joined: Fri Jun 03, 2005 4:43 pm

Re: How software performs functions through hardware...

Post by Diebert van Rhijn »

Ryan Rudolph wrote: But how does the result of an electrical pathway convert into a digit 0 or 1? And is it the mathematical results that do the work of software?
The element you're looking for is called the logic gate and the most common ones are NOR (negated OR: if at least one input is active, the output drops) and NAND (negated AND: both inputs need to be active for the output to drop) gates. A very primitive one you can see here, common before there were integrated (higher-density) circuit designs.

How to get from NAND or NOR circuits to more complexity one should study binary addition and subtraction methods. From this stage on you just have to think in bigger and bigger scales, models and abstraction to see how more complex operations could be devised by connecting blocks of simpler operations.
User avatar
Ryan Rudolph
Posts: 2490
Joined: Sun Jan 29, 2006 10:32 am
Location: British Columbia, Canada

Re: How software performs functions through hardware...

Post by Ryan Rudolph »

Diebert,

So are you saying that all the demands of software or work requested by software translates into addition, subtraction, multiplication or division through the activity of transistors?

I guess I'm wondering for example how an operating system loads its system files from an electrical current being controlled as you say through billions of transistors?

I can imagine a complicated web of interconnected transistors controlling the flow of electrical current, but I'm having trouble imagining how this translates into software actually doing something...it doesn't make sense to me that software should interface with hardware at all...
User avatar
Nick
Posts: 1677
Joined: Mon Nov 28, 2005 8:39 pm
Location: Detroit, Michigan

Re: How software performs functions through hardware...

Post by Nick »

Ryan Rudolph wrote:I can imagine a complicated web of interconnected transistors controlling the flow of electrical current, but I'm having trouble imagining how this translates into software actually doing something...it doesn't make sense to me that software should interface with hardware at all...
I've wondered about this question as well, only on an even more fundamental level, which is; why does electricity (the flow and sharing of electrons) result in mechanical motion, information transmission, heating, lighting, and all the rest? The best explanation I have ever heard or came up with is that it just does. :)
User avatar
Ryan Rudolph
Posts: 2490
Joined: Sun Jan 29, 2006 10:32 am
Location: British Columbia, Canada

Re: How software performs functions through hardware...

Post by Ryan Rudolph »

Nick,
The best explanation I have ever heard or came up with is that it just does. :)
oh it just does...now its all making sense to me... : )

Actually, this reminds me of a neuroscience course I took, which only left me even more bewildered with the whole matter creating consciousness issue. I've come to the conclusion that books by Daniel Dennett such as consciousness explained seem incredibly naive. I find It just as bewildering how a sac of tissues, blood and brain cells can give rise to something as extraordinary as consciousness at all.

What is interesting about this issue is that we are able to adequately explain many other types of technology, but computers seem to have evolved to such unfathomable complexity so quickly, that we are stuck with bits and pieces of knowledge that do not quite fit together to form a complete whole. There is probably a collection of theories all discovered independently of each other that one needs to understand in order to understand why electricity is capable of all the things you mentioned.

As far as information transfer that is an interesting one. Because I know the operating system is able to access information on the hard drive through requesting it, but how does information can relayed by transistors? Does all computer information simply translate into a series of 0 and 1s strung together? If so, that is quite remarkable that all the information we have access to is simply a unique pattern of 0s and 1s. And that we can make this pattern appear as anything from a video program to a wikipedia article.

At least with heating, lighting and mechanical motion, I can somewhat make sense of it by saying that electricity gives off an enormous amount of energy, energy that can be captured, controlled and converted into other types of energy that can be used to power devices. I can somewhat imagine that, but the relationship between software and hardware is harder to even come up with a rudimentary understanding from start to finish in order to get a picture in your head of what is going on.
User avatar
Nick
Posts: 1677
Joined: Mon Nov 28, 2005 8:39 pm
Location: Detroit, Michigan

Re: How software performs functions through hardware...

Post by Nick »

Ryan,

I think the most important thing to remember when trying to figure out how electricity transmits information, or how consciousness can be produced by unconscious matter is that the way these things appear to work has more to do with us than with the things themselves. I believe you said something similar yourself, along the lines of we have evolved to see order and cohesiveness in the universe where there otherwise might just be things bumping into each other with no "higher" or more complex properties and attributes resulting.

So really I just think of things like consciousness and information transmission as things just bumping into each other, and we have evolved to perceive it in a way that makes it appear to be more than things just bumping into each other. Kind of like an optical illusion I guess. You know what I mean? Like, I'm sure there's certain amounts of "ingredients" that need to come together to make these things happen, but when they come together it presents a radically different appearance to us, and based on how we are set up to perceive the world, it really couldn't appear any other way.

Another question to think about is why do we perceive the result of striking a match against an abrasive as fire? Again, the best explanation I or anyone else can come up with is that, it just does. I say this kind of in jest, but also with some seriousness as well.
User avatar
Ryan Rudolph
Posts: 2490
Joined: Sun Jan 29, 2006 10:32 am
Location: British Columbia, Canada

Re: How software performs functions through hardware...

Post by Ryan Rudolph »

Nick,
I believe you said something similar yourself, along the lines of we have evolved to see order and cohesiveness in the universe where there otherwise might just be things bumping into each other with no "higher" or more complex properties and attributes resulting.
Yes, you bring up an important point - as human beings attempting to be rational, we have an innate bias towards trying to make order, see patterns, and distinguish between things in such a way in order to come up with explanations. And making explanations about the world hinges on our ability to divide up reality into appearances, appearances that appear to interact differently based on their unique properties, behaviors and so on.

So the brain does attempt to make higher order explanations in order to survive, which has its place. As long as one realizes that there is really only an undivided totality, in a timeless dance so to speak, a dance of endless appearances, appearances unfolded back onto the mind, and the mind is left bewildered by its unique way of perceiving, a way of perceiving that is determined by the human animal itself.

And and there is no good reason why fire should take on the appearance it does. It is an impressive appearance for merely resulting from two substances bumping into each other, as you say.
User avatar
Nick
Posts: 1677
Joined: Mon Nov 28, 2005 8:39 pm
Location: Detroit, Michigan

Re: How software performs functions through hardware...

Post by Nick »

What's funny is how some scientists and computer programmers think they know it all, but at base they really can't explain how when they tweak this code a little bit here, or alter this formula a little bit there it ultimately gives rise to the things that it does. And even if and when these two groups of people come together and figure out what ingredients and the amount and order of them gives rise to consciousness and proclaim themselves to be gods and explain how they did it as if it were the be all end all of what the mind can uncover, they'll really just be cursing that which made it all happen in the first place; Reality. So in a very real sense, everything that happens in nature is magic.
Ryan Rudolph wrote:And and there is no good reason why fire should take on the appearance it does. It is an impressive appearance for merely resulting from two substances bumping into each other, as you say.
You're telling me! One time I was up smoking weed all night, and I looked at a book of matches sitting in front of me and was compelled to grab one and light it up. I was so fascinated with the ability of these two materials to react with each other in a way that produces the appearance of what we call fire that I ended up burning through the entire book, one match after the next. Part of that fascination was to do with being high, but the other part was because when you understand the fundamental nature of reality, you can look at something most would dismiss as trivial and see something far more amazing than initially meets the eye.
User avatar
Diebert van Rhijn
Posts: 6469
Joined: Fri Jun 03, 2005 4:43 pm

Re: How software performs functions through hardware...

Post by Diebert van Rhijn »

Nick Treklis wrote: I've wondered about this question as well, only on an even more fundamental level, which is; why does electricity (the flow and sharing of electrons) result in mechanical motion, information transmission, heating, lighting, and all the rest? The best explanation I have ever heard or came up with is that it just does. :)
The better question is: which kind of answer would you be willing to accept? Which parameters define the quality for you? And exactly there lies the lack in knowledge, not in the explanations you're receiving.
User avatar
Diebert van Rhijn
Posts: 6469
Joined: Fri Jun 03, 2005 4:43 pm

Re: How software performs functions through hardware...

Post by Diebert van Rhijn »

Ryan Rudolph wrote:So are you saying that all the demands of software or work requested by software translates into addition, subtraction, multiplication or division through the activity of transistors?
Semiconductors. But it could be any technology that would supply microscopic gates that can be combined in massive arrays, within any medium.
I guess I'm wondering for example how an operating system loads its system files from an electrical current being controlled as you say through billions of transistors?
It's a big question which cannot be answered without breaking it down for you which I'm not gonna do :-) But it's my background so I should be able to address some other things.
...it doesn't make sense to me that software should interface with hardware at all...
Well, one could easily model the process in a way that several layers or domains could be defined. One layer, where the software runs, lies on top of a physical layer where the electricity runs. Each is then a separate logical realm and need no interface ('awareness') of each other to operate. This way software is able to run on all kinds of hardware and from various media, even run on marbles or photons.

One could say that what connects or interfaces the layers are conventions, standards, protocols, etc. This way there's separation between idea (logic, addition, memory) and implementation (circuit board, wires, silicon, CPU). If you take this idea further one could see how all ongoing virtualization in the computer realm is a logical continuation of this abstraction process.
User avatar
Nick
Posts: 1677
Joined: Mon Nov 28, 2005 8:39 pm
Location: Detroit, Michigan

Re: How software performs functions through hardware...

Post by Nick »

Diebert van Rhijn wrote:The better question is: which kind of answer would you be willing to accept? Which parameters define the quality for you? And exactly there lies the lack in knowledge, not in the explanations you're receiving.
Right. The problem is when we believe our parameters to be absolute and we want all phenomena to be explained within them. Reality has another thing to say about that though.
Animus
Posts: 1351
Joined: Thu Nov 27, 2008 4:31 pm

Re: How software performs functions through hardware...

Post by Animus »

There is a reason its called "soft"ware. The reason is, it doesn't have physicality to it.

Generally in electronics, we have two 'realms' of operation. The one is the physical manifestation observable by the eyes and touchable by the hands. Then there is the logical or virtual aspects which occur in logical/virtual space, that is, they have no physicality but are functional networks.

Ultimately, this Logical/Virtual space is meaningless without the human observer. All the operations of the logic circuits results are meaningless until displayed to the observer (who makes sense of it). Don't think of the computer as knowing or understanding what its doing, or that the output of its operations are universally recognizable by all possible lifeforms. Much of what goes on with the computer, goes on for the express purpose of being intelligible to the human observer. For example, the image appears on the monitor at greater than 34.4 frames per second, as this is the minimal frame rate with which the human can perceive motion, and the motion "displayed" on the screen is really just a series of successive still images (like a movie film). If we were some space alien who couldn't perceive motion above 34.4 FPS, say all became blurry and incoherent above this rate, the space alien would find our computers to be incoherent and useless.

So... I would say, software exists (or not) in logical/virtual space, that is, software is no more than the functional operations performed by the hardware following a set of instructions, or the software is the set of instructions. Any intelligibility of the system is a product of the human brain and not the computer necessarily.
Tomhargen
Posts: 52
Joined: Sun Mar 30, 2008 10:49 am

Re: How software performs functions through hardware...

Post by Tomhargen »

I think a little clarification needs to be done here in order to specify exactly how a computer works.

I'll give (to my understanding) as basic a walk through on the way a computer could produce the answer to the question 2+2.

First, what you must realize, is that a computer does no storage nor does it actually comprehend anything at the hardware level. A computer is simply a massive set of wires and switches.
Ryan Rudolph wrote:But how does the result of an electrical pathway convert into a digit 0 or 1
It does not. The digits 0 and 1, are just visual readable representations of on or off.

Say we are working with the simplest electrical computer. It consists of many circuits, each hooked up to a light bulb. I turn two of them on by completing the circuits (basically how any electrical switch works). That is like inputting the digit two. Now the next function is to add. This turns on a switch which expands the circuit to another set of switches which I will interact with next. Then I turn two more lights on. I know have a total of four lights on. Now I can count the lights and I have the result of my math. 2+2=4.

Now if you are seeing this logically then you realize that something has to do the counting. Something has to store the procedures somewhere. Someone has to know that addition means adding circuits, subtracting means subtracting circuits and so forth. And while this seems like it must be true, I have said previously that nothing is actually stored physically on a computer. So how does it do it?

It uses a main board! The main board is something with all the switches turned to the correct position to interact with whatever new switches we would add to their circuit. It's actually rather genius. It will make more sense when we use another example.

Say we use the same computer except this time we want to do the equation 20/5=?

I turn on 20 switches. Then I turn on another switch that affects the circuit that is in place. For every switch I turn on next, it interrupts the flow of the circuit of 20. It blocks electricity going to the other circuits by turning switches off. So when I have turned 5 switches on, it has turned the correct number of light bulbs off from the first circuit, leaving four light bulbs on!

Hardware is all a set of switches. Along with devices for storing memory( like a hard disk, which is basically a very fragile rewritable CD) or reading other storage devices by reading the images displayed on them (like a CD drive). All of the data is stored as switches (much more complexly than my example though).

I hope I explained that well.
User avatar
Ryan Rudolph
Posts: 2490
Joined: Sun Jan 29, 2006 10:32 am
Location: British Columbia, Canada

Re: How software performs functions through hardware...

Post by Ryan Rudolph »

Tomhargen,

very clear explanation. But one question: is all software programming basically telling how circuits (transistors) how they should be turned on or off?
Tomhargen
Posts: 52
Joined: Sun Mar 30, 2008 10:49 am

Re: How software performs functions through hardware...

Post by Tomhargen »

Yes. If you really think about it, if it did anything else it would be magic. Some of the only things we know how to do with electricity are making it flow, storing it, and giving off light and heat. That's all that electricity is really good for honestly. So software simply tells what circuits to turn on and off and basically acts as a mediator between binary code and what we see on our screen. Everything that software does could be done by personally turning switches (which isn't really possible but you get my point) and then personally reading the data in terms of on/off/on/off. Some version of software is required to even display binary code as 1s or 0s.
Locked