Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
The (5) Parts Every Computer MUST have Input Devices (getting information IN) Humans Computers 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? Input and Output Devices Married Humans He is inputting She is outputting Memory Devices (storing information) Computers Humans Long term Short term 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 We don’t all speak the same language English “I like to feed my dog named Sir Barfs–A-Lot chocolate pretzels. Spanish Me gusta comer a mi perro llamado Barfs-A-Lot mucho chocolate pretzels. Humans and computers don’t either Java System.out.println("Hello World!"); Binary 0011001001110001010100 0110100010111001010010 Humans Understand Source Code A=5 B=6 C= A + B Question: Can you guess what the Java code above does? CPUs Understand Machine Code Binary 0011001001110001010100 0110100010111001010010 Question: Can you guess what the machine code above does? So we use translators (Compilers) Machine Code is computer readable Source Code is human readable Java Development Kit Virtual Machine System.out.println("Hello World!"); 0011001001110001010100 0110100010111001010010 Java code is translated twice! Source Code is human readable System.out.println("Hello World!"); Java code is translated twice! Source Code is human readable System.out.println("Hello World!"); STEP #1: The JDK compiles source code into Java byte code Development Kit Byte Code is an in between state mov eax, byte [ebp-4] mov edx, byte [ebp-8] add eax, edx mov ecx, eax Java code is translated twice! Source Code is human readable System.out.println("Hello World!"); STEP #1: The JDK compiles source code into Java byte code STEP #2: The JVM translates byte code into machine code and runs the machine code Development Kit Byte Code is an in between state mov eax, byte [ebp-4] mov edx, byte [ebp-8] add eax, edx mov ecx, eax Virtual Machine Binary Code or machine code is run by the CPU 0011001001110001010100 0110100010111001010010 Modding Concepts Making Mods (you need source) Byte Code mov eax, byte [ebp-4] mov edx, byte [ebp-8] add eax, edx mov ecx, eax • 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) Byte Code mov eax, byte [ebp-4] mov edx, byte [ebp-8] add eax, edx mov ecx, eax Source Code System.out.println("Hello World!"); 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 Development DevelopmentKit Kit New version with your Mod The JDK does the following: 1. Merges the source 2. Creates a new Minecraft 3. Generates the byte code Generating a new Minecraft version Source Code for your mod Source Code for Minecraft Development DevelopmentKit Kit New version with your Mod The JDK does the following: 1. Merges the source 2. Creates a new Minecraft 3. Generates the byte code The JVM does the following: 1. Translates byte code into machine code 2. Runs the Minecraft machine code Virtual Machine