Вы находитесь на странице: 1из 2

Unit 1-1 Homework Every computer fundamentally consists of hardware and software.

Computers communicate through sets of instructions given in machine language (binary). These sets of instructions are commonly known as computer programs. Assemblers are higher level languages based on binary used to facilitate programming. Assembler code is translated to binary language using interpreters or compilers. Understanding how binary and hexadecimal number systems work is useful because they are commonly used in computer applications. At the core of coding, binary is used to give machines instructions. Hex is used for memory addressing because less characters are needed to show values. Compilers read, translate and execute entire source code whereas interpreters do each of the three steps line-by-line. Machine language is binary whereas assembler language a higher level language based on binary. Assembler language is translated to machine language using either a compiler or interpreter. ASCII is a code system used to handle letter and basic characters values. However since UNICODE can hold values ranging from 0-65536, it provides code values for symbols of many languages/cultures. The two main programming paradigms are: procedural/structured programming and object-oriented programming. Algorithms are procedures, or a series of steps, used for solving problems. Algorithms are comprised of: the tasks that are to be done and the order in which they will be done. There was no standard method for building software in the 60s. This lack of structure led to coding made out of sequence which made code hard to understand. The three fundamental control structures are: sequence (order in which to execute), selection (conditions for execution) and repetition. Object oriented programming looks at the variables (or properties) along with the methods to carry out actions of an object. The two things held in an objects memory space are its properties and methods. Java is platform independent meaning that it can run on any machine without changing its source code. It does this by using the Java compiler which supplies a generic byte code (Java Byte Code) to a platform specific interpreter based on the system it is running on. This specific interpreter (JVM) does the final translation.

Unit 1-2 Homework 1) Binary to decimal: a) 57 b) 221 c) 861 d) 14 189 2) Decimal to binary: a) 1101 b) 1001 1100 3) Decimal to hexadecimal: a) D b) 24 c) 9C

c) 00001 0010 1001

d) 0100 0110 0101

d) 129 e) 465

4) Hexadecimal to decimal: a) 53 b) 61 c) 450 d) 3317 5) Binary to hexadecimal a) 39 b) DD c) 35D d) 376D 6) Hexadecimal to binary a) 0011 0101 b) 0011 1101

c) 11100 0010 d) 1100 1111 0101

Вам также может понравиться