Friday, March 15, 2013

Computer Programming for Teens

Hallo GerBro And GerSist .. This time, I love to know how to control the computer so that they can do something over and Repeat, making decisions, and save INFORMATION In, The right holder
also about the algorithm, which is required in the design of solutions for the pro-blems and the programmer can code in a number of languages.
In this chapter the components:
A. hardware and software is important
B. The concept of digitizing
C. Binary digits, bits, bytes
D. Computers, electronic machine
E. Language: high level vs low-level

chek it !!!!

A. Hardware and Software 
Hardware are the parts of a computer that is hard or be touched.
Such as: printers, external drives, scanners, modems, and so on.
Software is a program that runs on a computer or computers that make it operate.
Such as: commercial programs, games, word processing applications, and others.
The application program is a program that is sold on the market, for example, WinZip, iTunes, Microsoft Office, Adobe Acrobat, Skype, and so on.
The system is a set of software programs that allow computers to store data, retrieve data, save files, delete files, and, in general, allow the computer to operate the application program.

Let's look at the main part of the computer list:
1. Keyboard: Used to communicate with the computer
2. Mouse: Clicking and interact with the graphical user interface (GUI).
3. Printer: giving a paper on what is on the screen
4. Hard drive
Hard drive is the computer's internal memory. Program applications are stored here, such as the file system. Think of your hard drive as a permanent storage space owned computers.
5. External Drive
The external drive is used to expand storage capacity beyond the computer itself. Such as: flash disk, cd / dvd, floppy disks, etc.
6. RAM (random access memory)
RAM is really a work space for the computer. Ram is also a storage space on the computer temporarily.
7. ROM (Read-Only Memory)
ROM is memory is not lost when the machine is turned off. Specific instructions for the computer are permanently etched into achip when the computer produced. So the ROM is permanent memory and never lost
8. CPU (computer processing unit)
CPU is the main part of the computer here occurred storage, processing, and retrieval of data. CPU manages all functions including data processing computer-manipulated data to transmit from one place to another or by doing some math on the data. CPU found in the unit system consisting of a computer's internal pieces like the motherboard, internal memory, and so on.
The contents of the CPU are:
1. ALU (Arithmetic / Logic Unit)
The ALU affect the programmer. When you write a program for a computer, the ALU to be       called into use to do some math (arithmetic section) or to evaluate the decision (the logic) by the programmer. That is why we need to unit
2. Control Unit

B. Digitizing & Binary digits, bits, bytes
Digitization of information means using numbers to represent something other than a number. We digitize the sounds, colors, and even pictures. Once digitized, they can be handled by a machine that can recognize two integers: 1 and 0.
To understand how the computer does what it does, imagine the four cities, is approximately the same, as shown in Figure 1.1. A bad snowstorm has closed several roads between cities while others are still open.

 

Between Mapleville and Glaston roads are closed, such as the road between Whittier and Mapleville. The road between Glaston and Berkeley open, and the streets between Berkeley and Whittier open. If the number one (1) is an open road, and the number zero (0) is a closed path, then the image can be redrawn to look like Figure 1.2.


Now you can describe the situation using the numbers:


The use of zeros and ones to describe the situation is the way it is digitization. What is described by English words, such as open and closed, has now been described by zero and one. Both numbers are called binary digit binary words'''' implies there are only two of them, especially the zero and one. Bit boldfaced term formed from the letters of the two words'' binary digits.''
Now let's expand on the situation

MAPLEVILLE? Glaston? BERKELEY closed open
If we digitize the answer, it would look like this:

MAPLEVILLE? Glaston? BERKELEY 01
If we drop all the English words, the answer would be two bits:

Read more:

Whittier? BERKELEY? Glaston open open
Now we digitize the answer:


The first one states that the road is open from Whittier to Berkeley, and 1 second is an open road from Berkeley to Glaston.
Now look at an expanded map of the area, shown in Figure 1.3, this time adding the names of cities and smaller towns in between the big cities.


 A description of the situation of Mapleville to Berkeley by Glaston will look like the following:
MAPLEVILLE? FURLEIGH? Glaston? Crantz? BERKELEY closed open open open 0 1 1 1
 
or just four bits:
 
If you want to describe the situation and the road started going through Furleigh Mapleville, Glaston, Crantz, Berkeley, Rosswood, Whittier, Jackson and back to Mapleville, you'll see bits

Each sequence of 8 bits is called a byte. So we just used the order of the bytes of information.
Binary digits, or bits, can be used to describe many situations in the real world apart from the conditions mentioned. When numbers or digits are used to represent a particular situation or a bit of information, we have digitized information.
C. Computers, electronic machine
Computers: An Electronic Engineering To be a good programmer, it is important to start with a few basics about how computers operate ..
Computers are electronic machines. Hence the need electricity to operate.
If we assign a zero (0) to its stop and bit one (1) to the flow, this bit can be connected to the internal workings of the machine.
The capacity of the machine to manipulate the electronic states are used to create a language of zeros and ones is called machine language. It is called machine language because it is the basic language of the machine. Without getting bogged down in the details, the computer reveals all information with the bits and bytes of machine language.
Now read these examples of some computer language:


D. Language Level: High and Low
High Level Language High level languages ​​are languages ​​that'' high'' in the language of the computer languages ​​that machine'' natu-rally understood some''. High-level languages ​​are removed from the reality of how computers process data-that is, in terms of bits. Machine language is made of all the binary digits, but a high-level language using English words to give directions to the computer. In order to understand the high-level phrase, consider the fol-lowing analogy first.
using a high level language commands directly related to the problems are programmed as opposed to the internal workings of the machine.
callthecaterer, orderthefood, rentthehall, andsoon'' Pascal, Cobol, Fortran, Basic, C, Cþþ, Perl., and Java are examples of high-level languages. Note
For BASIC programmers, C may be considered as a low-level language, as it allows the programmer to have more control at a lower level than the BASIC programmer.
Maid Language: Translators Translators breaking high-level language code and low level into the machine language understood by the specific processor in the CPU. There are two types of interpreters: interpreters and compilers
Compilers Interpreters and translators can work in two different ways: as an interpreter or compiler. Inter-preters will translate one line of code at a time and generate an error message immediately. Compilers translate the entire file code once, not line by line. The compiler will not produce an error message until all codes have been translated. Original file or program that the programmer writes is called source code. Object code is the result of a translation and machine language version of the original file. Cþþ is an example of a compiled language, while BASIC is an interpreted one.
Note
Translators convert high-level language or low level language into machine language that is easily understood by a computer processor.
Algorithm: Basics for All Design for Programming Solutions
An algorithm is a set of steps to solve the problem. These steps can be repeated and may involve some decisions, like the choice of two or more things.

Consider the following example algorithm to purchase tickets to the movies.
1. Go to the theater.
2. The walk to the ticket booth.
3. Select the movie.
4. Pay the price.
5. Receiving tickets.

What about the algorithm for finding the smallest number among three numbers?
1. Compare the first number by the second number.
2. Dispose of a larger amount from step 1.
3. Compare the third number to the amount remaining.
4. Dispose of a larger amount from step 3.
5. Whatever amount is left is the smallest of the three.

Part Three of Each Algorithm An algorithm has three parts:
1. The steps are limited (eg, they do not last forever).
2. These steps can be repeated.
3. Step may involve decision-making.
End

Each step of the algorithm should follow the previous steps. If necessary, repeat several steps and skip the others if the decision calls for action.
Look at this short Cþþ program print the message'' Could you please say that again'' 250 times on a machine.?
 
Here is another version of the same program in Pascal.

Each example can be written in any language. The main point of this program is that they both contain a circle, which is another way of saying that a particular task is being executed repeatedly.
Programming depends on the ability to write clear, step-by-step solution called algorithms in a language. Some high level language and is easy to use, while others are more difficult languages ​​to learn because of their low level and closer to understanding.

copyright by nozhbitha

0 comments:

Post a Comment

Newer Post Older Post Home

Nozh_Statistik

Selamat Datang, di Tunggu Ocehannya :) © copyright by Nozhbitha

Translate

Facebook Nozhbitha

Twitter-nozhbitha

Followers

copyright by Nozhbitha. Powered by Blogger.
 

Blog Archive