Intorduction To Computer

A computer is a multipurpose electronic device that can receive, process and store data

Digital Logic

Digital, or boolean, logic is the fundamental concept underpinning all modern computer systems.

Digital Logic Simulator

A logic simulator is a computer program that allows designers and experimenters to conduct virtual tests of complex digital circuitry before working with any hardware

MIPS(Microprocessor without Interlocked Pipeline Stages)

MIPS or Microprocessor without Interlocked Pipeline Stages is a reduced instruction set computer (RISC) instruction set architecture The first commercial MIPS model, R2000 was announced in 1985.

MIPS(Microprocessor without Interlocked Pipeline Stages) Simulator

SPIM is a MIPS processor simulator, designed to run assembly language code for this architecture. The program simulates R2000 and R3000 processors, and was written by James R. Larus while a professor at the University of Wisconsin-Madison.

Language of the Computers

Introduction - Assembly Language The basic job of a CPU,its excute lots of instructions.The set of instructions a particular CPU implements is an Instruction Set Architecture (ISA),few examples: 1) Intel 80x86 (Pentium 4) 2)IBM/Motorola 3)PowerPc (old Macintosh) 4)MIPs 5)Intel IA64 Different CPU implement different sets of instructions.

The Processor

Introduction - A processor is the logic circuitry that responds to and processes the basic instructions that drive a computer. The four primary functions of a processor are fetch, decode, execute and writeback.

Memory Organization

Introduction -A memory or a data byte, or a word, or a double word, or a quad word may be accessed from or at all addressable locations with a similar process would be used to access from all locations and there is would be equal access time for a read or for a write that is independent of a memory address location.

Input and Ouput

In this blog I will discuss on input/output procedures and devices .External device are not generally connected directly int the bus structure of the computer.I/O module is an interface for the external devices (peripherals) to CPU and memory.

Parallel Processing

Introduction to Parallel Processing - In computers, parallel processing is the processing of program instructions by dividing them among multiple processors with the objective of running a program in less time. - In the earliest computers, only one program ran at a time.

Monday, 31 October 2016

MIPS SIMULATOR : The SPIM operating system



   The SPIM simulator comes with a rudimentary operating system, which allows the programmer usage of common used functions in a comfortable way. Such functions are invoked by the syscall-instruction. Then the OS acts depending on the values of specific registers




.

MIPS SIMULATOR : Type of Simulator

TYPE OF MIPS SIMULATOR 


QTSPIM

The newest version of Spim is called QtSpim, and unlike all of the other version, it runs on Microsoft Windows, Mac OS X, and Linux the same source code and the same user interface on all three platforms! QtSpim is the version of Spim that currently being actively maintaned. The other versions are still available, but please stop using them and move to QtSpim. It has a modern user interface, extensive help, and is consistent across all three platforms. 

QtSpim makes my life far easier, and will likely improve yours and your students' experience as well. A compiled, immediately installable version of QtSpim is available for Microsoft Windows, Mac OS X, and Linux can be downloaded from:  https://sourceforge.net/projects/spimsimulator/files/.


GXemul (formerly known as mips64emul) is a computer architecture emulator being developed by Anders Gavare. It is available as free software under a revised BSD-style license. In 2005, Gavare changed the name of the software project from mips64emul to GXemul. This was to avoid giving the impression that the emulator was confined to the MIPS instruction set, which was the only architecture being emulated initially.

Although development of the emulator is still a work-in-progress, since 2004 it has been stable enough to let various unmodified guest operating systems run as if they were running on real hardware. Currently emulated processor architectures include ARM, MIPS, M88K, PowerPC, and SuperH. Guest operating systems that have been verified to work inside the emulator are NetBSD, OpenBSD, Linux, HelenOS, Ultrix, and Sprite.

Apart from running entire guest operating systems, the emulator can also be used for experiments on a smaller scale, such as hobby operating system development, or it can be used as a general debugger.





MARS (MIPS Assembler and Runtime      Simulator)

MARS is a lightweight interactive development environment (IDE) for programming in MIPS assembly language, intended for educational-level use with Patterson and Hennessy's Computer Organization and Design.It was developed by Pete Sanderson and Kenneth Vollmar at Missouri State University.







       QEMU (short for Quick Emulator)

It is a free and open-source hosted hypervisor that performs hardware virtualization (not to be confused with hardware-assisted virtualization).QEMU is a generic and open source machine emulator and virtualizer. When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

QEMU is a hosted virtual machine monitor: It emulates CPUs through dynamic binary translation and provides a set of device models, enabling it to run a variety of unmodified guest operating systems. It also can be used together with KVM in order to run virtual machines at near-native speed (requiring hardware virtualization extensions on x86 machines). QEMU can also be used purely for CPU emulation for user-level processes, allowing applications compiled for one architecture to be run on another..
  


MIP SIMULATOR ONLINE

             MIPhpS: Online MIPS Simulator v0.10



Please enter MIPS binary below. It should include address-instruction pairs in hexadecimal, formatted with a colon between the address and the data (instruction)

link mip simulator online : https://alanhogan.com/asu/assembler.php

MIPS Simulator (Introduction)


SPIM is a MIPS processor simulator, designed to run assembly language code for this architecture. The program simulates R2000 and R3000 processors, and was written by James R. Larus while a professor at the University of Wisconsin-Madison.[2] The MIPS machine language is often taught in college-level assembly courses, especially those using the textbook Computer Organization and Design: The Hardware/Software Interface by David A. Patterson and John L. Hennessy (ISBN 1-55860-428-6).

The name of the simulator is a reversal of the letters "MIPS".

SPIM simulators are available for Windows (PCSpim), Mac OS X and Unix/Linux-based (xspim) operating systems. As of release 8.0 in January 2010, the simulator is licensed under the standard BSD license.

In January, 2011, a major release version 9.0 features QtSpim that has a new user interface built on the cross-platform Qt UI framework and runs on Windows, GNU/Linux, and Mac OS X. From this version, the project has also been moved to SourceForge for better maintenance. Precompiled versions of QtSpim for Linux (32-bit), Windows, and Mac OS X, as well as PCSpim for Windows are provided.



 Figure 1









Sunday, 30 October 2016

Introduction To Computer

Introduction To Computer


A computer is a multipurpose electronic device that can receive, process and store data. They are used as tools in every part of society together with the Internet. Computers nowadays are complex; there are a lot of different components inside them, and they all serve different purposes. They all need to work together for the computer to work; knowing how a computer works makes it easier to use a computer by being able to understand how a computer will respond.

What Is Computer?



A computer is an electronic device that takes input such as numbers, text, sound, image, animations, video, etc., processes it, and converts it into meaningful information that could be understood, presenting the changed input (processed input) as output. All numbers, text, sound, images, animations, and video used as input are called data, and all numbers, text, sound, images, animations, and video returned as output are called information. Input is the raw data entered into the computer by using input devices.
The data consists of numbers, text, sound, images, animations, and video.
The process converts numbers, text, sound, images, animations, and video (data) into usable data, which is called information.
The information consists of numbers, text, sound, images, animations, and video that has been converted by the process.
The data is inserted using an input device.
The central processing unit (CPU) converts data to information.
The information is put on an output device.


A storage device is an apparatus for storing data and information. A basic computer consists of 4 components: an input device , a CPU, output devices, and memory.























MONITOR







KEYBOARD










CPU CASING















SPEAKER







MOUSE




Saturday, 29 October 2016

Digital Logic-Logic Gates



Logic Gates

If we think of two signals, A and B, as representing a truth value of two different propositions, then A could be either TRUE (a logical 1) or FALSE (a logical 0). B can take on the same values. Now consider a situation in which the output, C, is TRUE only when both A is TRUE and B is TRUE. We can construct a truth table for this situation. In that truth table, we insert all of the possible combinations of inputs, A and B, and for every combination of A and B we list the output, C.
 

A
B
C
False
False
False
False
True
False
True
False
False
True
True
True


An AND Example

Let's imagine a physician prescribing two drugs. For some conditions drug A is prescribed, and for other conditions drug B is prescribed. Taken separately each drug is safe. When used together dangerous side effects are produced.

Let
A = Truth of the statement "Drug 'A' is prescribed.".
B = Truth of the statement "Drug 'B' is prescribed.".
C = Truth of the statement "The patient is in danger.".

Then, the truth table below shows when the patient is in danger.
 

A
B
C
False
False
False
False
True
False
True
False
False
True
True
True
Notice that C is TRUE when both A AND B are true and only then!



AND GATES

An AND function can be implemented electrically using a device known as an AND gate. You might imagine a system in which zero (0) is represented by zero (0) volts, and one (1) is represented by three (3) volts, for example. If we are going to use electrical devices we need some sort of symbolic representation. There is a standard symbol for an AND gate shown below.





Often in lab work it's helpful to use an LED to show when a signal is 0 or 1. Usually a 1 is indicated with an LED that is ON (i.e. glowing). You can use the buttons below to check out this AND gate (Note what an AND gate symbol looks like!) with a simulated LED. Note the following in the simulation (and you can use this in your lab experiments).


To get a logical zero, connect the input of the gate to ground to have zero (0) volts input.
To get a logical one, connect the input of the gate to a five (5) volts source to have five volts at the input.
Each button controls one switch (two buttons - two switches) so that you can control the individual inputs to the gate.
Each time you click a button, you toggle the switch to the opposite position.



        Once we introduce Boolean variables, we can rethink the concept of a truth table. In the truth table below, if A, B and C are truth tables and we have an AND gate with A and B as inputs and C as the output, the truth table would look like this.

A
B
C
0
0
0
0
1
0
1
0
0
1
1
1



OR Gates


Consider a case where a pressure can be high and a temperature can be high Let's assume we have two sensors that measure temperature and pressure.. The first sensor has an output, T, that is 1 when a temperature in a boiler is too high, and 0 otherwise. The second sensor produces an output, P, that is 1 when the pressure is too high, and 0otherwise. Now, for the boiler, we have a dangerous situation when either the temperature or the pressure is too high. It only takes one. Let's construct a truth table for this situation. The output, D, is 1 when danger exists.   
 


T
P
D
False
False
False
False
True
True
True
False
True
True
True
True
        

What we have done is defined an OR gate. An OR gate is a gate for which the output is 1 whenever one or more of the inputs is 1. The output of an OR gate is 0 only when all inputs are 0. Shown below is a schematic symbol for an OR gate, together with the simulated LEDs and input buttons so that you can explore OR gate behavior.



In terms of Boolean variables, the truth table for an OR gate looks like this.
  
 


A
B
C
0
0
0
0
1
1
1
0
1
1
1
1


NOT Gates (Inverters)
A third important logical element is the inverter. An inverter does pretty much what it says. If the input is 0, the output is 1. Conversely, if the input is 1, the output is 0. The symbol for an inverter is shown below. Again, you can putter with this inverter with the simulated LEDs. X is the input to the inverter. The output is NOT-X represented as ~1 or:
The truth table for an inverter is pretty simple since there is only one input. Call the input A, and the output C, and the truth table is:

A
C
0
1
1
0

NAND Gates
        

There is another important kind of gate, the NAND gate. Actually, the way to start thinking about a NAND gate is to think of it as an AND gate with an inverter on the output. That's shown below.





Actually, however, the symbol for a NAND gate compresses the inverter down to a dot at the output of the NAND gate as shown below.



Digital Logic-Think Binary !



Think Binary!

Let's examine a typical situation. You have some sort of device that generates a logic signal.
It could be a telephone that converts your voice signal into a sequence of zeros and ones.
It could be the thermostat on the wall that generates a 1 when the temperature is too low, and a 0 when the temperature is above the set point temperature.

The logic signal, A, takes on values of 0 (FALSE, OFF) or 1 (TRUE, ON). That signal might really be a voltage, a switch closure, etc. However, we want to think in terms of zeros and ones, not in terms of the values of the voltage.






Operations on Logic Signals

Once we have the concept of a logic signal we can talk about operations that can be performed on logic signals. Begin by assuming we have two logic signals, A and B. Then assume that those two signals form an input set to some circuit that takes two logic signals as inputs, and has an output that is also a logic signal. That situation is represented below.







The output, C, depends upon the inputs, A and B. There are many different ways that C could depend upon A and B. The output, C, is a function, - a logic function - of the inputs, A and B. IWe will examine a few basic logic functions - AND, OR and NOT functions and start learning the circuitry that you use to implement those functions.

Thursday, 27 October 2016

Digital Logic- Introduction

DIGITAL LOGIC

Introduction
Digital, or boolean, logic is the fundamental concept underpinning all modern computer systems. Put simply, it’s the system of rules that allow us to make extremely complicated decisions based on relatively simple “yes/no” questions.
In this tutorial you will learn about…
Digital circuitry
Digital logic circuits can be broken down into two subcategories- combinational and sequential. Combinational logic changes “instantly”- the output of the circuit responds as soon as the input changes (with some delay, of course, since the propagation of the signal through the circuit elements takes a little time). Sequential circuits have a clock signal, and changes propagate through stages of the circuit on edges of the clock.
Typically, a sequential circuit will be built up of blocks of combinational logic separated by memory elements that are activated by a clock signal.
Programming
Digital logic is important in programming, as well. Understanding digital logic makes complex decision making possible in programs.

There are also some subtleties in programming that are important to understand; we’ll get into that once we’ve covered the basics.


Digital Logic Simulator

DIGITAL LOGIC SIMULATOR

A logic simulator is a computer program that allows designers and experimenters to conduct virtual tests of complex digital circuitry before working with any hardware. The user can interact with the program to find a component arrangement that will perform a desired task. Once a suitable design has been found, the logic simulator makes it easy to optimize,debug, and modify the circuitry.
All digital systems comprise multiple logic gates, often in vast numbers. Some large or sophisticated systems also contain smaller, self-contained digital devices such flip flops,multiplexers, oscillators, integrators, differentiators, and counters. Each smaller device plays a unique and vital role in the complete system. Before the advent of logic simulators, engineers had to design digital devices and systems by going through a tedious combination of trial-and-error hardware manipulation and educated guesswork.


Logic simulators vary from vendor to vendor, but all offer intuitive GUIs (graphical user interfaces) including toolbars, drag and drop, color coding, and online help. Some programs also offer animation, signal tracing, and alternative logic-gate interconnection options. On the downside, logic simulators run far more slowly than the actual systems do (in some cases millions of times more slowly). Logic simulators can also place significant demands on computer resources because of the vast number of parallel hardware processes that take place in any nontrivial digital system.




Saturday, 15 October 2016

MIPS : Memory Allocation and Data Alignment

Memory Allocation

Figure 2

  • Based on Figure 2, system based on MIPS processors typically divide memory into three parts:

    1. Text segment :
    - This holds the machine language code for instructions in source file (user                                    program)

    2. Data segment :
    - This holds the data that the program operate on. It is divided into two parts.                                Static data contains data that are statically allocated whose size does not                                      change as the program access them. On top of static data is dynamic                                            data.This data is allocated and deallocated by the programs executes.  

    3. Stack segment :
    - This segment resides at the top of user address space. In a high level                                            language program, local variable and parameters are pushed and popped on                                the stack as the operating system expands and shrink the stack segment                                        toward segment toward the data segment.

Data Alignment
  • Table 1 lists data sizes apply to MIPS chips.


    Table 1

  • Table 2 shows data alignment in MIPS.


    Table 2

Friday, 14 October 2016

MIPS Introduction

Intorduction
  • MIPS or Microprocessor without Interlocked Pipeline Stages is a reduced instruction set computer (RISC) instruction set architecture
  • The first commercial MIPS model, R2000 was announced in 1985.It had thirty-two 32-bit general purpose registers, but no condition code register which the designers considered it a potential bottleneck.
  • Figure 1 shows the architecture of MIPS R2000.


Figure 1

  • From Figure 1, a SPIM processor compose of an integer processing unit (the CPU), and a collection of coprocessor that perform subsidiary tasks.
  • SPIM simulates two coprocessor, Coprocessor 0 handles traps, exceptions, and the virtual memory system.MIPS simulates most of the first two and entirely omits details of the memory system.Coprocessor 1 is the floating point unit.SPIM simulates most aspects of this units.