Wednesday, 11 December 2013

Four people are trying to get across a bridge the zombies are coming so they only have 15 minutes. person 1 takes 1 minute to get across person 2 takes 2 minutes person 3 takes 5 and person 4 takes 8 minutes
two may cross at once and they will go at the same pace as the slowest on the bridge and they need a torch to cross

firstly a and b will cross elapsing a total time of 2 minutes  a because he is the fastest will bring the torch back which takes it up to three minutes he passes the torch to c and d who cross in 8 minutes bringing the time up to 11 minutes then b will come back with the torch taking 2 minutes taking it up to 13 minutes and bring over a taking a total of 15 minutes.

yay

or alternatively a and b could leave behind c and d the slow people they are.
they may not be fast but they make good zombie bait!




and Christmas Pikachu

Monday, 9 December 2013

basic program

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.
The following program will demonstrate how to use the branching instructions of the LMC to implement decision making.  Note: The Branch Always instruction should only be used to connect paths indicated by your flowchart. 

Thursday, 5 December 2013

little man computing

Little man computing is a simplified version of a basic computer system

The little man computing is an instructional model  of a computer. The LMC is generally used to teach students, because it models a simple von Neumann architecture computer - which has all of the basic features of a modern computer. It can be programmed in machine (albeit usually in decimal) or assembly code



















Thursday, 28 November 2013

Bytes And Bits

Bytes And Bits
 
a byte is 8 binary digits long or 8 bit

a nibble is 4 binary digits or 4 bits

a bit is the smallest form of binary number

a kilobyte is 1024 bytes

a megabyte is 1024 kilobytes

a gigabyte is 1024 megabytes

a terabyte is 1024 gigabytes

a petabyte is 1024 terabytes
 
an Exabyte is 1024 petabytes

the human brain is estimated to be around 2.5 petabytes big.

Monday, 25 November 2013

RAM (Random Access Memory) is volatile which means it is lost when the computer is turned off
ROM (Read Only Memory) is non volatile which means it is always there
images are represented with binary code different combinations of binary numbers make different colours.

for example with 1 bit you can have 2 colours mine will be black and white 0 is black  and 1 is white.

1111111111111
1101111111011
1111111111111
1101111111011
1110000000111
1111111111111

psychotic smiling man

Thursday, 24 October 2013

An SSD is better than a hard drive but it is considerably more expensive and hard drives have more memory for the money but are not as fast.

inputs and outpurts

Inputs and Outputs

for example a monitor is an output device because it outputs a picture on the screen
a keyboard is an input device because you input the keys you want it to type
a touch screen is both because you input what it does and it shows you what it is doing at the same time.

a controller is also both because you input directions and it vibrates.

Thursday, 10 October 2013

binary

binary consists of 0's 1's.
logic gates take in the binary numbers and use them for example the logic gates are:

NOT
if it is 1 it will become 0 if it is 0 it will become 1

OR
two inputs if there is a 1 in it it will be a 1

AND
and is like or but instead if there is a 0 in it it will become a 0


Thursday, 26 September 2013

CPU For 7 Year Olds

Inside your computer there is a mythical entity called A Central Processing Unit it is not very smart and he has a terrible memory and when you want to do stuff such as printing repetitively he would have two inputs 1.) print and 2.) goto 1 in the RAM tray he would have to go into the ROM tray and see how to print then he would print and go to his next instruction in the RAM tray It says goto 1 he would go to 1 and 1 is print he would do this over and over until the computer is switched off.


that's why CPU has an extremely sad life.

Thursday, 19 September 2013

2.) explain the diffrence between proprietary and open standards.

proprietary standards are standards owned by accompany and these are that company's standards making it simple for people because they know what to expect open standards are publically available and can be edited by the public.

 

the main difference is that one is exclusive to the company and can only be edited by the company and the other is open to the public and can be edited by anyone.

ethical considerations
these refer to what is right and wrong
the privacy and security parts of a system

environmental considerations
disposal of computers needs top be cleaner and they need to use less power

legal consideration
defined by laws
hacking and such
proprietary standards
these standards are owned by a company e.g windows
advantages:
look and feel familiar
work in a predictable way
be maintained by one company

industry standards
standards agreed by industry

de facto standards
standards developed by common usage

open standards
they can be edited by users

Thursday, 12 September 2013

An embedded system is a special-purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs pre-defined tasks, usually with very specific requirements. Since the system is dedicated to a specific task, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, so the cost savings may be multiplied by millions of items.

some examples are :
Microwave
Washing machine
Car

Thursday, 5 September 2013

phone lines used to be operated by hand and workers would connect different wires to different ports.

clothes used to be washed by hand before washing machines existed or they could use machines operated by hand.

A computer system is made up of lots of parts and takes inputs processes them and makes outputs it is also programmable.