Saturday, June 29, 2013

Pseudocode. Briefly explain ten pseudocode convention.

pseudocode:-Pseudocode and flowcharts are both popular ways of representing algorithms. Pseudocode has been chosen as the primary method of representing an algorithm because it is easy to read and write, and allows the programmer to concentrate on the logic of the problem. Pseudocode is really structured English. It is English that has been formalised and abbreviated to look like the high-level computer languages.
Pseudo code conventions:
1. Comments begin with // and continue until the end of line.
1.  Blocks are indicated and matching braces.: { and }.
2.  An identifier begins with a letter
3.  Assignment of values to variables is done using the assignment statement
<variable> := <expression>
4.  There are two Boolean values true and false
5.  Elements of multi dimensional array are accessed using [ and ].
6.  The following looping statements are employed: for, while and repeat – until
7.  A conditional statement has the following forms:
If <condition> then <statement>;
8.  Input and output are done using the instructions read and write.
9.  There only and one type of procedure: Algorithm

An algorithm consists of heading and body. The heading takes the form

Algorithm, different criteria of the computer algorithm

Algorithm:-  An algorithm is a finite set of instructions that, if followed, accomplishes a particular ta
  
In addition, all algorithms must satisfy the following criteria:
Input:   zero or more quantities are externally supplied.
Output:  At least one quantity is produced.
Definiteness:   Each instruction is clear and unambiguous.
Finiteness:   if we trace out the instructions of an algoritm, then for all cases, the algorithm terminates   after a finite number of steps.

Effectiveness :       Every instruction must be very basic  so that it can be carried out , in principle, by  a person using only pencil and paper . it is not enough that each operation be definite as in criterion 3; it  is also must be feasible.

Tuesday, June 25, 2013

Analyzing Adam Smith’s theory in the graph

 Analyzing Adam Smith’s theory in the graph:

            According to Adam Smith’s theory labor cost / resource cost is considered. And it can be analyzed through the following graph:
In the above figure the horizontal line represents product X and the vertical line represents product Y. A Á   is the production possibility of country A. And BB is the production possibility of country B. If country A uses its resources in producing product X then its production will be OA (10units) and if it produces product Y then production will be OA (5units).

           
                                                

Monday, June 24, 2013

Economic gains from absolute cost advantage trade theory of Adam Smith:

Economic gains from absolute cost advantage trade theory of Adam Smith

            The trade or economic gain from the absolute cost advantage theory of Adam Smith can be discuss through the following way—

1.      Increase world’s total production.
2.      Possibility of specialization.
3.      Increase consumption.

1. Increase world’s total production:
            According to Adam Smith’s absolute cost advantage trade theory, trade occurred between countries that can bring gain for the countries. If there would be no trade then the both countries had to produce the both products. Then according to above mentioned table the total production would be produce X, 10+5 = 15 units
                                                               And Y, 5+10 = 15 units
                                                              
                                                                                      = 30 units     
That means the total production would be 30 units of the two countries. But it there is trade between these two countries then country A only produce product X and country B produce only product Y. And when country A will produce only product X then its production will be 20 units and production of country B will be 20 units of product Y. Thus total production will be 20+20=40 units. Before trade total production was 30 units and after trade it has been 40 units. So, it can be said that because of trade according to absolute advantage theory world wide total production will be increased.

2. Possibility of specialization:
            According to Adam Smith absolute specialization is possible through trade. Because when a country become specialized in producing a special product it can make sure the proper utilization of resources.

3. Increase consumption:

            Through specialization more production is possible. Then it is also possible to export the surplus product to another country. And the opposite country can get the opportunity to consume the products by import. And in result it increase the consumption and the society can be benefited from it.

Saturday, June 22, 2013

Absolute Cost Advantage Trade Theory of Adam Smith:

Absolute Cost Advantage Trade Theory of Adam Smith.

            According to Adam Smith a country may have full facilities to produce some specific products than other countries. Which country have the full facilities to produce a specific product the country specialize the production of that product. And avoid the production of the products for what the country have not full facilities. Finally it will import the non-produced products from another country.

Applications:
1.      Two countries.
2.      Two products.
3.      Unit of production (Resource).
4.      Avoiding transportation cost.

Source of Trade:
[Production unit of seven (7) days based on resources]

Country
Product X  (unit)
Product Y (unit)
Domestic Production ratio
A
10
5
10:5=2:1
B
5
10
5:10=1:2

From the above table it is noticed that country A  can produce 10 unit X products or 5 unit Y products by a fixed labour power or resources. On the other hand country B can produce 5 unit X product or 10 unit Y product by a fixed labour power or resource. It can be said that country A has full facilities to produce product X than country B. And country B has definitely full facilities to produce product Y than country A.
            Now, for country A, 10 X > 5Y
            And for country B, 10Y > 5X

As a result according to absolute cost advantage theory there will be a trade relationship between these two countries. Country A will produce and export product X and import product Y. on the other hand country B will do the opposite that means it will produce and export product Y and import product X. Thus trade relation is built between two countries. There may be difference among absolute advantage of different countries. That result in trade. The aim of trade is to gain mutual advantage.

Thursday, June 20, 2013

Interrupt

Define interrupt. various interrupt with example  

When a Process is executed by the CPU and when a user Request for another Process then this will create disturbance for the Running Process. This is also called as the Interrupt. Interrupts can be generated by User, Some Error Conditions and also by Software’s and the hardware’s. But CPU will handle all the Interrupts very carefully because when Interrupts are generated then the CPU must handle all the Interrupts Very carefully means the CPU will also Provides Response to the Various Interrupts those are generated. So that When an interrupt has Occurred then the CPU will handle by using the Fetch, decode and Execute Operations.

Types of Interrupts

Generally there are three types o Interrupts those are Occurred For Example 
1)   Internal Interrupt 
2)   Software Interrupt.
3)   External Interrupt.
The External Interrupt occurs when any Input and Output Device request for any Operation and the CPU will Execute that instructions first For Example When a Program is executed and when we move the Mouse on the Screen then the CPU will handle this External interrupt first and after that he will resume with his Operation.

The Internal Interrupts are those which are occurred due to Some Problem in the Execution For Example When a user performing any Operation which contains any Error and which contains any type of Error. So that Internal Interrupts are those which are occurred by the Some Operations or by Some Instructions and the Operations those are not Possible but a user is trying for that Operation. And The Software Interrupts are those which are made some call to the System for Example while we are Processing Some Instructions and when we want to execute one more Application Programs.

Function of BCD adder and diagram

Function of BCD adder and diagram


Binary coded (BCD) full adder performs the addition of two decimal numbers (A0±A3, B0±B3). The look ahead generates the BCD carry terms internally, allowing the 'F583 to then do BD addition correctly. For BCD numbers 0 through 9 at A and B inputs, the BCD sum forms at the output. In the addition of two BCD numbers totaling a number greater than 9, a valid BCD number and a carry will result. For input values larger than 9, the number is converted from binary to BCD. Binary to BCD conversion occurs by grounding one set of inputs, An or Bn, and applying any 4-bit binary number to the other set of inputs. If the input is between 0 and 9, a BCD number occurs at the output. If the binary input falls between 10 and 15, a carry term is generated. Both the carry term and the sum are the BCD equivalent of the binary input. Converting binary numbers greater than 16 may be achieved through cascading 'F583s.

Multiplier Flowchart


Characteristics of RISC and CISC

Characteristics of RISK and CISK
Ans:-

RISC/CISC Characteristics (PowerPC) RISC Technology

Modern programmers use assembly:
•  for hand coding  for speed
•  for debugging

Common features of CISC:
•   many instructions that access memory directly
•   large number of addressing modes
•   variable length instruction encoding
•   support   for misaligned accesses

Common RISC characteristics
•  Load  /store architecture (also called register-register or RR
Architecture  ) which fetches operands and results indirectly from
main memory through a lot of scalar registers.  Other architecture
is storage-storage or SS in which source operands and final
results are retrieved directly from memory.
•  Fixed length instructions which
  (a) are easier to decode than variable length instructions, and
  (b) use fast, inexpensive memory to execute a larger piece of
code.
•  Hardwired controller instructions (as opposed to micro coded
instructions).  This is where RISC really shines as hardware
implementation of instructions is much faster and uses less silicon
real estate than a micro store area.
•  Fused or compound instructions which are heavily optimized for
the most commonly used functions.
•  Pipelined  implementations with goal of executing one instruction
(or more) per machine cycle.


Tuesday, June 18, 2013

Function of DMA controller

Function of DMA controller
  
The Direct Memory Access (DMA) controller allows I/O devices to transfer data directly to and from memory. This frees the system microprocessor of I/= tasks, resulting in a higher throughput.The functions of the DMA controller can be grouped into two categories: program mode and DMA transfer mode. The DMA controller supports the following:
    * Register an program compatibility with the IBM Personal Computer AT DMA channels                          (8237 compatible mode)
          * 16MB 24-bit address capability for memory and 64Kb 16-bit address capability for I/O
        * Eight (AT only 4?) independent DMA channels capable of transferring data between memory and I/O devices

DMA Controller Operations

The DMA controller does two types of operations:
          * Data transfer between memory and I/O devices

          * Read verifications

Main criteria of parallel processing

Main criteria of parallel processing

PARALLEL PROCESSING
A parallel processing system is able to performconcurrent data processing to achieve faster execution time
The system may have two or more ALUs and beable to execute two or more instructions at thesame time
 A computer employing parallel processing isalso called parallel computer.

Parallel processing classification
ü  Single instruction stream, single data stream ±SISD
ü  Single instruction stream, multiple data stream ±SIMD
ü  Multiple instruction stream, single data stream ±MISD
ü  Multiple instruction stream, multiple data stream ±MIMD

The IBM System/360 (S/360)

The IBM System/360 (S/360) 

The IBM System/360 (S/360) was a mainframe computer system family announced by IBM on April 7, 1964, and delivered between 1965 and 1978.[1] It was the first family of computers designed to cover the complete range of applications, from small to large, both commercial and scientific. The design made a clear distinction between architecture and implementation, allowing IBM to release a suite of compatible designs at different prices. All but the most expensive systems used microcode to implement the instruction set, which featured 8-bit byte addressing and binary, decimal and floating-point calculations.
The slowest System/360 models announced in 1964 ranged in speed from 0.0018 to 0.034 MIPS;[2] the fastest models were approximately 50 times as fast[3] with 8 kB and up to 8 MB of internal main memory,[3] though the latter was unusual, and up to 8 megabytes of slower Large Core Storage (LCS). A large system might have as little as 256 kB of main storage, but 512 kB, 768 kB or 1024 kB  was more common. System/360 was extremely successful in the market, allowing customers to purchase a smaller system with the knowledge they would always be able to migrate upward if their needs grew, without reprogramming of application software or replacing peripheral devices. The design is considered by many to be one of the most successful computers in history, influencing computer design for years to come.

The chief architect of System/360 was Gene Amdahl, and the project was managed by Fred Brooks, responsible to Chairman Thomas J. Watson Jr.[3] The commercial release was piloted by another of Watson's lieutenants John R. Opel who managed the launch of IBM’s System 360 mainframe family in 1964.[4]Application level compatibility (with some restrictions) for System/360 software is maintained until present day with the IBM z Series computers. 

Saturday, June 15, 2013

Architecture

Architecture
The word architecture can have many meanings. Depending on the context, architecture can refer to:
  •  any man-made building or structure
  •  a man-made building or structure that is important, large, or highly creative
  •  a carefully designed object, such as a chair, a spoon, or a tea kettle
  •  a design for a city, town, park, or landscape
  •  the art or science of designing and building buildings, structures, objects, and outdoor spaces
  •  a building style or method
  •  a plan for organizing space
  •  the flow of information on a Web page
  •  the planned design of any kind of system
  •  a systematic arrangement of information or ideas