Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Java Tutorials


 

 

Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Computer Architecture and Programming Languages

[an error occurred while processing this directive]
  • CPU - Central Processing Unit - The "brains" that performs the computations.
  • Main Memory - Where everything must be for the CPU to use it.
  • Input and Output - Devices used to enter or display information.
    • Storage - A disk (or similar device) for saving programs and data.
  • IFSM 310 is an entire course about computer architecture.

Main Memory / RAM

  • Main memory is also known as RAM (Random Access Memory)
  • To run any program, it must be loaded from the disk into RAM.
  • RAM is volatile - All memory is lost when the power is off.
  • For something to be permanent, it must be written to a disk (storage).
  • RAM is composed of bits.

Bits - Binary Digits

  • A bit has two possible values: 0 or 1.
  • Hardware representation: voltage, current, magnetic field, reflectivity, ...
  • Everything is represented as bits. (numbers, characters, sound, images, program instructions, ...)
  • Groups of 8 bits are called called bytes.
  • A common size for RAM is 256 MB (megabytes).
  • Each byte has an identifying address.

CPU - Central Processing Unit

  • CPU is typically implemented as one chip.
  • The CPU gets machine instructions from memory, and does them one at a time.
  • An machine instruction contains an opcode that tells what to do and generally one or more operand addresses that specify what to do it to.
  • Machine instructions are very small steps: eg, add the byte at location 253398 to the byte a location 84992 and store the result in byte 234344.
  • The CPU is able to do these instructions very rapidly. A common speed might be 1 GHz, which means that it does something (part or all of an instruction) in a billionth of a second.
  • Different types of CPUs use different instructions (Intel x86, Power PC, Sparc, ...).
  • Unfortunately, humans cannot easily work with binary machine instructions (hence the use of programming languages).

Input / Output

  • Input / Output devices transfer bits into or out of memory or CPU.
  • The hard disk is like other devices, but is sometimes grouped separately because of its use to store programs and data (storage).
  • Relatively slow compared to CPU and RAM.

Machine-Human Mismatch - Programming languages

  • Machine instructions are difficult for humans to use (eg, 0000011011000101)
  • Human language can not be understood by machines, at least directly.
  • The compromise is to choose a "programming language" that humans can read and write, and that can be translated by a program into machine instructions.

Hierarchy of Programming Languages

  1. Machine instructions - Too difficult for humans.
  2. Assembly language
    • Each machine instruction represented symbolically. Eg "AR R12, R5".
    • Easy to understand and translate, but tediously detailed.
    • Not portable - specific to one type of CPU.
    • Is not commonly used for mainstream programming.
  3. High-level language - Mainstream programming.
    • Human "readable" language
      if (age > 21)
         canDrink = true;
    • Usually portable - can be translated for different CPUs.
    • Examples: Pascal, Cobol, Perl, Visual Basic, C, C++, Java, C#, ...
    • Human writes "source program". It's translated into an "object program" by a compiler.
  4. Natural languages (English, Deutsch, ...)
    • Impractical to translate into machine instructions.
    • [an error occurred while processing this directive] Surprisingly ambiguous. "He saw a bottle of wine on the table and drank a glass of it."
Ask programming questions?

 

 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

0 comments so far (post your own) View All Comments Latest 10 Comments:
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name

 

 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.

[an error occurred while processing this directive]