Thursday, 5 December 2013

Basic Program In Little Man Computer

Program

INP
STA VALUE
LDA ZERO
STA TRINUM
STA N
LOOP LDA TRINUM
SUB VALUE
BRP ENDLOOP
LDA N
ADD ONE
STA N
ADD TRINUM
STA TRINUM
BRA LOOP
ENDLOOP LDA VALUE
SUB TRINUM
BRZ EQUAL
LDA ZERO
OUT
BRA DONE
EQUAL LDA N
OUT
DONE HLT
VALUE DAT 000
TRINUM DAT 000
N DAT 000
ZERO DAT 000
ONE DAT 001

What you should do

  1. Click on the "LMC Simulator Applet" link to start the LMC simulator.
  2. Clear the Message Box and all of the LMC mailboxes -- click the "Clear Messages" button and the "Clear" button if necessary.
  3. Copy the twenty eight line program above and paste it into the Message Box
  4. Click on the "Compile Program" button.
  5. Click on the "Run" button.
  6. When prompted, enter three-digit numbers in the "In-Box", and press the "Enter" button.

What you should see

  • After the program is compiled, you should see from mailbox 0 to 23 the instructions 901, 323, 526, 324, 325, 524, 223, 814, 525, 127, 325, 124, 324, 605, 523, 224, 720, 526, 902, 622, 525, 902.  The Program Counter should start at 0 (click on "Reset" if necessary).
  • DAT reserves mailbox 23 for N (the user input), mailbox 24 for TRINUM (the value of the current triangular number), mailbox 25 for COUNT (the number of triangular numbers that have been calculated), mailbox 26 for ZERO, and mailbox 27 for ONE. 
  • When you click on "Run" or "Step", the Message Box will describe the actions of each instruction.
  • The first two instructions accept the input VALUE from the user.
  • The next three instructions initialize the values of TRINUM and N to ZERO.
  • The algorithm is as follows: calculate triangular numbers until the calculated triangular number is greater than or equal to the input value.  If the triangular number is equal to the input, then output N.  Otherwise, output ZERO.
  • The LOOP starts by checking this exit condition.  The input VALUE is subtracted from TRINUM.  As long as the result is negative, the LMC stays in the loop (i.e. the BRP does nothing) to calculate more triangular numbers.
    • To calculate the next triangular number, N is incremented by ONE, and this new value of N is added to TRINUM.  Remember, the nth triangular number is calculated by adding n to the previous triangular number.
    • The BRA LOOP indicates the end of the loop body.  This BRANCH command causes the execution of the LMC to "jump" back to the start of the loop.
  • After exiting the LOOP, the value of TRINUM is greater than or equal to the input VALUE -- the LMC has calculated enough triangular numbers to determine if the user input is one.
  • The SUB instruction is to check if TRINUM and VALUE are equal.
    • If they are equal, subtracting TRINUM from VALUE will equal 000.  BRZ will allow the LMC to skip past the code section that handles when these two values are not equal.  The LMC will then execute the code segment that outputs N to the Out-Box -- the input VALUE is the Nth triangular number.
    • If they are not equal, the result on the Accumulator will not be 000, and BRZ will do nothing.  The code after of the BRZ instruction is executed.  This code outputs ZERO to the Out-Box, and then skips past the code for the two values being EQUAL to the end of the program.

Little Man Computer

The Little Man Computer (LMC) is an instructional model of a computer, created in 1965. The LMC is generally used to teach students, because it is simple . It can be programmed in machine or assembly code.

Thursday, 28 November 2013

Memory sizes

Bit

Short for binary digit, the smallest unit of memory on a machine.



Nibble:


Half of an eight-bit byte - four bits.


Byte:


A byte is equal to 8 bits.


Kilobyte:


A kilobyte is 1,024 bytes


Megabyte:


When used to describe data storage, 1,048,576 bytesMegabyte is frequently abbreviated as MB.











Gigabyte:


One gigabyte is equal to 1,024 megabytes. Gigabyte is often abbreviated as GB.


Terabyte:


This is approximately 1 trillion bytes. Terabyte is abbreviated as TB.



bit= binary digit 1 or 0
nibble= 4 bits
byte= 8 bits
kilobyte= 1024 bytes
megabyte= 1024 kilobyte
gigabyte= 1024 megabyte

terabyte=
s 1024 gigabyte

Monday, 25 November 2013

8-BIT Pictures

 8-bit colour graphics is a method of storing image information in a computer's memory or in an image file, such that each pixel is represented by one 8-bit byte. The maximum number of colours that can be displayed at any one time is 256. There are two forms of 8-bit colour graphics. The most common uses a separate palette of 256 colours, where each of the 256 entries in the palette map to given red, green, and blue values.

Thursday, 21 November 2013

Binary Code

binary code represents text or computer processor instructions using the binary number system's two binary digits, 0 and 1. A binary code assigns a bit string to each symbol or instruction. For example, a binary string of eight binary digits (bits) can represent any of 256 possible values and can therefore correspond to a variety of different symbols, letters or instructions.

Thursday, 24 October 2013

MEMORY

An SSD is better than a magnetic hard drive because it is faster although they come at higher prices at lower memory capacities. I think personally that optical disks will go out of use because of their low memory capacity and the fact that you can buy everything online now.

Inputs and Outputs

For example a touch screen tablet or phone, When you touch the screen (Input) it processes the information and goes onto what you touched (Output).

Monday, 21 October 2013

CPU Purpose

Uno.) El propósito de una CPU es controlar el movimiento de los datos. instrucciones que dicen la forma de realizar estas acciones.

One.) The purpose of a CPU is to control the movement of data. instructions tell it how to perform these actions.

واحد.) الغرض من وحدة المعالجة المركزية هو السيطرة على حركة البيانات. تعليمات يقولوا ذلك كيفية تنفيذ هذه الإجراءات.

один.)Целью процессор для управления движением данных. Инструкции сообщить ему, как выполнить эти действия.

一.)一個CPU的目的是控制數據的移動。指令告訴它如何執行這些操作。

Uno.) Lo scopo di una CPU è quello di controllare il movimento di dati. istruzioni gli dicono come eseguire queste azioni.

ένα.) Ο σκοπός μιας CPU είναι να ελέγχει την κίνηση των δεδομένων. οδηγίες που λένε πώς να εκτελέσετε τις ενέργειες αυτές.

Thursday, 10 October 2013

Binary


Binary consists of only 0's and 1's which join up to form data.

Thursday, 26 September 2013

CENTRAL PROCESSING UNIT

Stands for "Central Processing Unit." This is the pretty much the brain of your computer. It processes everything from basic instructions to complex stuff. Any time something needs to be computed, it gets sent to the CPU. Every day, it's compute this, compute that, you'd think the CPU would need a break after awhile. But no, it just keeps on processing. The CPU can also be referred to simply as the processor.

Thursday, 19 September 2013

Explain the difference between proprietary standards and open standards

Both proprietary and open standards are made by developers or inventors. Yet proprietary standards are owned by a company and cannot be copied by other companies, a bit like copyright. Open standards are available to everyone and can be edited by anyone to make it better, or possibly make it worse.

Considerations

Ethical considerations:

These are privacy and security parts of the computing system.

Environmental considerations:

Computers need to be disposed of correctly and need to have a low power consumption.

Legal considerations:

DON'T HACK

STANDARDS


Proprietary standards:

Standards owned by a company

Industry standards:

Standards that are agreed across the industry.

De facto standards:

Standards developed through common usage.

Open standards:

They can be edited by the users.

Thursday, 12 September 2013

Faults in computer systems

A fault in automatic stock trading software cost Knight Capital a reported $440m. The software was based on an incorrect algorithm which bought stocks at the market price and then sold them seconds later at the bid price which was a few cents less. The exercise lasted for 45 minutes and the rapid trades pushed the market price up creating a larger spread between the market price and the bid price making the problem worse.

Thursday, 5 September 2013

WASHING MACHINES

"WASHING CLOTHES USE TO BE DONE BY HAND BEFORE EVERYONE GOT INTO THE TECH SPIRIT"
-JACK BAKER 

COMPUTER SYSTEM EXAMPLES:


  • DESKTOP COMPUTER
  • LAPTOP
  • PDA
  • MAINFRAME
  • NETWORKS
  • GAMES CONSOLES
  • DIGITAL WATCH
  • PHONE
  • TABLET
  • PRINTER
  • WASHING MACHINE

A Computer System

A computer system is one that is able to take a set of inputs, process them and create a set of outputs. This is done by a combination of hardware and software.