A question regarding a computers intelligence

In summary, a computer sees windows and other components differently then you do. When you save a file, the computer calculates the location of the save function based on the window you were working in and the mouse position.
  • #1
Macwoni
6
0
A question regarding a computers "intelligence"

So I've been reading on Boolean logic and understand to a basic degree as to how the computer calculates it's binary but I would like to know how a computer knows where your icons are on a desktop.How does it know that when you click on save the first time in a window,then shrink the window and click on the save function,how does it actually know where the save function is going to be at all times? I imagine this has to do with the same technology as the mouse being able to move around the screen?

And another question regarding the new i phone,what is it that allows the iphone to have applications that let you interact with what's going on in the screen in relation to how the i phone is positioned? I know there probably won't be any simple answer to both questions but if somebody could point me to the right resources I have no problem taking the initiative to educate myself.Thank you for any help.
 
Computer science news on Phys.org
  • #2


I'd like to be able to answer your first question, but I'm a bit confused about the minimizing.
  1. For the most part, when you click the save button it's initializing a class and that class is going to open a form and set itself to be modal (hopefully) so you can't do anything else while that form is open.
  2. When you select a location, that location is then verified to not exist, if it does exist then it's going to prompt you to overwrite (which is boolean flag in the class initialization), it passes the string back to the calling application which has been awaiting a response.
  3. The file you're saving then is saved to the location that you had entered in the save dialog class.
The mouse moving on the screen is something I don't have any idea about nor really want to figure out. Kinda like Einstein and determining the beginning of the universe, don't want to think about it because it'll worry me. :-)

The iPhone and other phones of that nature have a gyroscope built in that knows which way is down and a compass to determine which direction they're looking. So when the programmer is writing their application they are including an event to trap that direction changing and updating their program accordingly. (That's the easiest way I can say it)

Hope that answers your question!
 
  • #3


Macwoni said:
So I've been reading on Boolean logic and understand to a basic degree as to how the computer calculates it's binary but I would like to know how a computer knows where your icons are on a desktop.How does it know that when you click on save the first time in a window,then shrink the window and click on the save function,how does it actually know where the save function is going to be at all times? I imagine this has to do with the same technology as the mouse being able to move around the screen?

And another question regarding the new i phone,what is it that allows the iphone to have applications that let you interact with what's going on in the screen in relation to how the i phone is positioned? I know there probably won't be any simple answer to both questions but if somebody could point me to the right resources I have no problem taking the initiative to educate myself.Thank you for any help.

Computers see windows and other components differently then you do on a monitor. A computer sees nothing but rectangles. A window is nothing more then a group of rectangles. Windows just keeps up with what rectangles are visible and their locations on a plane (like graphic calculators). Your mouse is associated with a point on the screen. When you click your mouse, the computer calculates what visible rectangle was clicked on, and then calls the function if any exist that is associated with that rectangle.

I'm not familiar with that technology; however, I would guess that it works by using sensors. When the sensors detect a change, they generate a hardware interrupt. When the software sees this hardware interrupt, it does what it is programed to do for that position.
 
  • #4


Macwoni said:
I would like to know how a computer knows where your icons are on a desktop.How does it know that when you click on save the first time in a window,
Lots and lots of layers of software!
The mouse contains a tiny computer that counts how many times the wheel has moved and sends this to the PC. A bit of the software in Windows (or Linux or MacOSX) called a device driver responds to this and calcualtes the new position of the mosue.
It then tells the graphics layer that the mosue has changed, this then tells the graphics hardware to draw the mouse at a new position.
When you click the button it sends a similair message, then the software resposnsible for the desktop checks if you you clicked inside the area of any of the windows or icons. It then sends a message to the app to tell it there was a mouse click, the application then decides what code to run as a result of a mosue click on that button.
All this explains why on a computer capable of doing billions of operations a second it sometimes seems slow to do something like open a program!


And another question regarding the new i phone,what is it that allows the iphone to have applications that let you interact with what's going on in the screen in relation to how the i phone is positioned?
The iPhone has accelerometers that measure how the device is tilted (wrt gravity) and moved see http://en.wikipedia.org/wiki/Accelerometer
 
  • #5


Tanner65 said:
The mouse moving on the screen is something I don't have any idea about nor really want to figure out. Kinda like Einstein and determining the beginning of the universe, don't want to think about it because it'll worry me. :-)

The iPhone and other phones of that nature have a gyroscope built in that knows which way is down and a compass to determine which direction they're looking. So when the programmer is writing their application they are including an event to trap that direction changing and updating their program accordingly. (That's the easiest way I can say it)

Hope that answers your question!

They don't have gyroscopes; they use accelerometers. They're nifty little devices, try Googling them.
 
  • #6


The computer doesn't really "know" where anything is in a the sense that we usually use the word "know," but it is able to determine whether the mouse is in the "icon area." (For one thing, it put the icon there!) As the mouse moves around the screen, it's feeding the x and y coordinates to the system. The icons also have a coordinate system to which the mouse coordinates correspond. Essentially, when the mouse coordinates are within the coordinates of the area defined by the icon (which the computer doesn't even actually "see"), the program or file that the icon is associated with in the computer is able to be selected and run or opened by clicking the mouse. Hope that helps.

Mike
 

FAQ: A question regarding a computers intelligence

1. What is the current understanding of a computer's intelligence?

The current understanding of a computer's intelligence is that it is a combination of its ability to process information, solve problems, and learn from data using algorithms and programming. It is not the same as human intelligence, but rather a specialized form of artificial intelligence.

2. How do computers demonstrate intelligence?

Computers demonstrate intelligence through various tasks such as recognizing patterns, making predictions, and understanding natural language. These abilities are programmed into the computer using algorithms and data.

3. Can computers become smarter than humans?

It is currently debated whether computers can become smarter than humans. While they may excel in certain tasks, they lack the emotional and creative intelligence that humans possess. However, with advancements in technology and artificial intelligence, it is possible that computers may surpass human intelligence in the future.

4. Is there a limit to how intelligent a computer can become?

There is currently no definitive answer to this question. Some experts believe that there may be a limit to how intelligent a computer can become, while others believe that with advancements in technology and artificial intelligence, there may be no limit.

5. Can computers have consciousness or emotions?

At this time, computers do not have consciousness or emotions in the same way that humans do. They are programmed to simulate emotions and may appear to have consciousness, but it is not the same as human consciousness. Some experts believe that it is possible for computers to develop consciousness in the future, but it is a highly debated topic.

Similar threads

Back
Top