Discussion is right way to get Solution of the every assignment, Quiz and GDB.
We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us! NOTE: Don't copy or replicating idea solutions. Quiz Copy Solution Mid and Final Past Papers Live Chat
Question 1) Write a program in Dev C++ to draw a circle. Also, use the flood fill algorithm to fill the circle with different lines of red color. The output of your program should like the below image:
// C Implementation for setfillstyle
// and floodfill function
// driver code
// gm is Graphics mode which is
// a computer display mode that
// generates image using pixels.
// DETECT is a macro defined in
// "graphics.h" header file
int gd = DETECT, gm;
// initgraph initializes the
// graphics system by loading
// a graphics driver from disk
initgraph(&gd, &gm, " ");
// center and radius of circle
int x_circle = 250;
int y_circle = 250;
// setting border color
int border_color = WHITE;
// set color and pattern
// x and y is a position and
// radius is for radius of circle
// fill the color at location
// (x, y) with in border color
// closegraph function closes the
// graphics mode and deallocates
// all memory allocated by
// graphics system
Value of Destination Operand
Data Bus <15…0>
Address Bus (15…0>
Table 3 Data Bus and Address Bus Contents for Modified Eagle
Calculation Steps (Instruction-By-Instruction)
• LDACC B
LDACC stands for load accumulator. In LDACC, the destination operand is accumulator and source operand is the memory location labelled as B. The memory label B points to the memory address 3320h. When this instruction is executed, the value stored at memory address 3320h will be read and loaded in Accumulator register. This address 3320h will be copied into Address Bus which will then read its contents from memory and load the contents at data bus. The operand size in Modified EAGLE is 2-byte. Therefore, the values stored at addresses 3320h and 3321h will be loaded at data bus. These values are CEh and 55h respectively. Since, Modified EAGLE employs Little endian notation hence, the 2-bye value will be read as 55CEh. The value of data bus will also be 55CEh and this will be loaded into destination operand Accumulator. • SUB R1
SUB R1 means to subtract the value of source operand register R1 which is 0015h, from the destination operand Accumulator (ACC) register which contains 55CEh. The result of subtraction will be stored back into ACC. After subtraction, the value stored in ACC will be 55B9h. Because SUB is not a memory instruction, we are not concerned with the contents of Data Bus or Address Bus because the values we need to execute the instruction are already available in registers. Hence, Data Bus and Address Bus values will be labelled as N/A. • LDACC C
When this instruction is executed, the value stored at memory address labelled with C is read and loaded in Accumulator register ACC. In this case, the address of the C is AB0Eh which is also the value of address bus. The operands in Modified EAGLE are 2-byte values. The contents at addresses AB0Eh and AB0Fh will be copied into data bus which will then be loaded into ACC register. These contents are 15h and 20h. Due to Little endian notation, the 2-bye value will be 2015h. The value of data bus will be 2015h and same will be loaded in destination register ACC. • ADDR2
When ADD is executed, the value of register R2 is added to ACC register. Hence, after the execution, the ACC register will hold 45E0h. AS usual, ADD is not a memory instruction, so we are not concerned with the values of Data Bus and Address Bus and both are labelled as N/A. • STACC A
STACC stands for Store ACC. There is one destination operand which is a memory label A. When the instruction is executed, the value of Accumulator register ACC is stored at the memory address labelled by A. The destination memory address will be AB10h. The value of ACC is 45E0h will be stored as address AB10h. However, due to Little-Endian notation, the address will be stored as E0h at memory location AB10h and then 45h at memory location AB11h.
Semester: Fall 2021
General Science (GSC101)
Total Marks: 20
Due Date: 12thDecember,2021
The assignment has been designed to enhance your knowledge and understanding about Laws of Physics and application of Physics in our daily life.
• Please read the following instructions carefully before solving & submitting assignment:
• To solve this assignment, you should have good command over first 09 lectures.
• The assignment will not be accepted after due date.
• Zero marks will be awarded to the assignment that does not open or the file is corrupt.
• The assignment file must be an MS word (doc) file format; Assignment will not be accepted in any other format.
• Use Math Type or Equation Editor etc for mathematical symbols.
• Zero marks will be awarded to the assignment if copied (from other student or copied from handouts or internet).
• Don’t wait for the last date to submit your assignment.
For any query about the assignment, contact only [email protected]
Do not post queries related to assignment on MDB.
Question-1 (4 Marks)
Write down two real life examples where object is moving with positive velocity but having negative acceleration?
Question-2 (6 Marks)
Read the following statements carefully, discussed which Newton law of motion is applicable and also explain reason.
Newton Law of Motion
Explanation according to Newton
1. If you release a balloon in air
2. You need more force to move and accelerate a heavier objects than lighter objects.
3. A child riding a merry-go-round lets go and is thrown off the ride
Question-3 (10 Marks)
In the given figure two objects are hung on a frictionless pulley. The block of mass (m1) moves down and the bucket of mass (m2) moves up. Find out the magnitude of acceleration (a) of these two objects and tension (T) in the string. (Neglect the masses of pulley and rope)