View
20
Download
0
Category
Tags:
Preview:
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
Citation preview
The (5) Parts Every Computer MUST have
Humans Computers
Input Devices (getting information IN)
Question: What other INPUT devices can you think of?
Output Devices (getting information OUT)
Humans Computers
Question: What other OUTPUT devices can you think of?
Married Humans
Input and Output Devices
He is inputting She is outputting
Memory Devices (storing information)
Long term
Short term
Humans Computers
CPU Devices (logic and calculator)
Humans Computers
Bus (transfer of information/data)
Humans Computers
Question: how do you think information travels in humans? In Computers?
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 “
Programming Concepts
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
Java Binary
00110010011100010101000110100010111001010010
System.out.println("Hello World!");
Humans and computers don’t either
A=5B=6C= A + B
Humans Understand Source Code
Question: Can you guess what the Java code above does?
Binary
00110010011100010101000110100010111001010010
CPUs Understand Machine Code
Question: Can you guess what the machine code above does?
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
Java code is translated twice!
System.out.println("Hello World!");
Source Code is human readable
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
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
Modding Concepts
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?
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
MCreator: An easy-to-use mod maker
Generates Source Code for your mod
Generating a new Minecraft version
Source Code for your mod
Source Code for Minecraft
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
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
Recommended