the (5) parts every computer must have

24
The (5) Parts Every Computer MUST have

Upload: cicada

Post on 29-Jan-2016

21 views

Category:

Documents


0 download

DESCRIPTION

The (5) Parts Every Computer MUST have. Input Devices (getting information IN). Computers. Humans. Question: What other INPUT devices can you think of?. Output Devices (getting information OUT). Computers. Humans. Question: What other OUTPUT devices can you think of?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The (5) Parts Every Computer MUST have

The (5) Parts Every Computer MUST have

Page 2: The (5) Parts Every Computer MUST have

Humans Computers

Input Devices (getting information IN)

Question: What other INPUT devices can you think of?

Page 3: The (5) Parts Every Computer MUST have

Output Devices (getting information OUT)

Humans Computers

Question: What other OUTPUT devices can you think of?

Page 4: The (5) Parts Every Computer MUST have

Married Humans

Input and Output Devices

He is inputting She is outputting

Page 5: The (5) Parts Every Computer MUST have

Memory Devices (storing information)

Long term

Short term

Humans Computers

Page 6: The (5) Parts Every Computer MUST have

CPU Devices (logic and calculator)

Humans Computers

Page 7: The (5) Parts Every Computer MUST have

Bus (transfer of information/data)

Humans Computers

Question: how do you think information travels in humans? In Computers?

Page 8: The (5) Parts Every Computer MUST have

Alan Turing & Von Neumann

1) Input 2) Output 3) Memory 4) CPU

5) Bus

• Alan Turing thought of (created the theory) a machine that would run a stored program

• Von Neumann’s design defined/said: “All digital computers have the same (5) parts “

Page 9: The (5) Parts Every Computer MUST have

Programming Concepts

Page 10: The (5) Parts Every Computer MUST have

English Spanish

Me gusta comer a mi perro llamado Barfs-A-Lot mucho chocolate pretzels.

“I like to feed my dog named Sir Barfs–A-Lot chocolate pretzels.

We don’t all speak the same language

Page 11: The (5) Parts Every Computer MUST have

Java Binary

00110010011100010101000110100010111001010010

System.out.println("Hello World!");

Humans and computers don’t either

Page 12: The (5) Parts Every Computer MUST have

A=5B=6C= A + B

Humans Understand Source Code

Question: Can you guess what the Java code above does?

Page 13: The (5) Parts Every Computer MUST have

Binary

00110010011100010101000110100010111001010010

CPUs Understand Machine Code

Question: Can you guess what the machine code above does?

Page 14: The (5) Parts Every Computer MUST have

00110010011100010101000110100010111001010010

System.out.println("Hello World!");

So we use translators (Compilers)

Development Kit

Virtual Machine

Java

Source Code is human readable Machine Code is computer readable

Page 15: The (5) Parts Every Computer MUST have

Java code is translated twice!

System.out.println("Hello World!");

Source Code is human readable

Page 16: The (5) Parts Every Computer MUST have

Java code is translated twice!

mov eax, byte [ebp-4]mov edx, byte [ebp-8]add eax, edxmov ecx, eax

System.out.println("Hello World!");

Source Code is human readable

Byte Code is an in between state

STEP #1: The JDK compiles source code into Java byte code

Development Kit

Page 17: The (5) Parts Every Computer MUST have

Java code is translated twice!

mov eax, byte [ebp-4]mov edx, byte [ebp-8]add eax, edxmov ecx, eax

00110010011100010101000110100010111001010010

System.out.println("Hello World!");

Source Code is human readable

Byte Code is an in between state

Binary Code or machine code is run by the CPU

STEP #1: The JDK compiles source code into Java byte code

Virtual Machine

Development Kit

STEP #2: The JVM translates byte code into machine code and runs the machine code

Page 18: The (5) Parts Every Computer MUST have

Modding Concepts

Page 19: The (5) Parts Every Computer MUST have

Making Mods (you need source)

mov eax, byte [ebp-4]mov edx, byte [ebp-8]add eax, edxmov ecx, eax

Byte Code

• You only get byte code when you buy the game• Unfortunately you need source code to make mods

Question: How do you get the source from the Byte code?

Page 20: The (5) Parts Every Computer MUST have

De-compiler (reverse translator)

System.out.println("Hello World!");

Source Code

mov eax, byte [ebp-4]mov edx, byte [ebp-8]add eax, edxmov ecx, eax

Byte Code

Forge takes the byte code you get when you purchase Minecraft and decompiles it, and generates Minecraft source code that you can then modify

Page 21: The (5) Parts Every Computer MUST have

MCreator: An easy-to-use mod maker

Generates Source Code for your mod

Page 22: The (5) Parts Every Computer MUST have

Generating a new Minecraft version

Source Code for your mod

Source Code for Minecraft

Page 23: The (5) Parts Every Computer MUST have

Generating a new Minecraft version

Source Code for your mod

Source Code for Minecraft

New version with your Mod

The JDK does the following:1. Merges the source2. Creates a new Minecraft3. Generates the byte code

Development KitDevelopment Kit

Page 24: The (5) Parts Every Computer MUST have

Generating a new Minecraft version

Source Code for your mod

Source Code for Minecraft

New version with your Mod

The JDK does the following:1. Merges the source2. Creates a new Minecraft3. Generates the byte code

Development Kit

Virtual Machine

The JVM does the following:1. Translates byte code into

machine code2. Runs the Minecraft machine

code

Development Kit