Adsence

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.