Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
-
Upload
margaretmargaret-owens -
Category
Documents
-
view
221 -
download
1
Transcript of Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.
![Page 1: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/1.jpg)
![Page 2: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/2.jpg)
![Page 3: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/3.jpg)
Parts of a Computer
![Page 4: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/4.jpg)
Why Use Binary Numbers?
![Page 5: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/5.jpg)
Source Code - Assembly - Machine Code
![Page 6: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/6.jpg)
Why Java?
Safety
The safety features of the Java language make it possible to run Java programs in a browser without fear that they might attack your computer. As an added benefit, these features also help you to learn the language faster. When you make an error that results in unsafe behavior, you receive an accurate error report.
Portability
The other benefit of Java is portability. The same Java program will run, without change, on Windows, UNIX, Linux, or Macintosh. In order to achieve portability, the Java compiler does not translate Java programs directly into CPU instructions. Instead, compiled Java programs contain instructions for the Java virtual machine, a program that simulates a real CPU. Portability is another benefit for the beginning student. You do not have to learn how to write programs for different platforms.
![Page 7: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/7.jpg)
Java Versions
![Page 8: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/8.jpg)
every Java program has a class
the program must have a main method
A Java Program
![Page 9: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/9.jpg)
A Java Program
programming languages use reserve words that have special meaning and cannot be used for other purposes
the programmer names the program and decides what it should do
this line tells the computer where to display the message later, we will learn some other options for displaying messages
![Page 10: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/10.jpg)
Another Java Program
line numbers are used in book to help with descriptions of programsbook uses a different style to define program blocks
![Page 11: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/11.jpg)
Another Java Program
![Page 12: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/12.jpg)
Computers can "Do the Math"
![Page 13: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/13.jpg)
Steps in the Development of a Java Program
![Page 14: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/14.jpg)
JVM1
JVM2
JVM3
JVMn
:
One Bytecode, Many JVM's
Java Source CodeText Editor
FileAccess
Program I/O - Compiler Messages
jGraspIntegrated Development Environment (IDE)
There is a different configuration of the Java Virtual Machine (JVM)for every platform (type of computer) and Operating System (OS)
this computer
that computer
mobile device
the other computer
![Page 15: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/15.jpg)
Installing NetBeans
The NetBeans Integrated Development Environment (IDE) is available at the NetBeans Web site: https://netbeans.org/downloads/7.1/
If the Java Development Kit (JDK) is not already installed on your computer, you will need to download and install it as well. The JDK is available on the Oracle Web site:
The Standard Edition (SE) is preferred for both NetBeans and the JDK.
http://www.oracle.com/technetwork/java/javase/downloads/
![Page 16: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/16.jpg)
https://netbeans.org/downloads/7.1/
![Page 17: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/17.jpg)
http://www.oracle.com/technetwork/java/javase/downloads/
![Page 18: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/18.jpg)
don't forget to acceptthe license agreement
For Windows OS...
32-bit computers use x86 version
64-bit computers use x64 version
![Page 19: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/19.jpg)
NetBeans IDE 7.4
![Page 20: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/20.jpg)
New Project
![Page 21: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/21.jpg)
Project Name
![Page 22: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/22.jpg)
Writing the Source Code
![Page 23: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/23.jpg)
Installing jGrasp
http://www.jgrasp.org/
http://www.oracle.com/technetwork/java/javase/downloads/index.html
![Page 24: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/24.jpg)
Starting jGrasp
![Page 25: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/25.jpg)
Quick StartOpen - Compile - Run
![Page 26: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/26.jpg)
A New Editor Window in jGrasp
![Page 27: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/27.jpg)
Creating and Saving a Java Program
![Page 28: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/28.jpg)
The Encode / Debug Cycle
![Page 29: Parts of a Computer Why Use Binary Numbers? Source Code - Assembly - Machine Code.](https://reader030.fdocuments.us/reader030/viewer/2022032802/56649e025503460f94aeda41/html5/thumbnails/29.jpg)
Summary
A Textbook for Two Courses
Parts of a Computer
Why Computers use binary numbers.
Source Code, Assembly, and Machine Code
Structure of a Java Program
Java Program Development
Bytecode and the JVM
Installing and Using jGrasp
Encoding and Debugging