Questions
Write an 8088/8086 assembly program that counts the length of a null terminated string that starts...

Write an 8088/8086 assembly program that counts the length of a null terminated string that starts at location STR.print The result on the screen Assume string length will not exceed 255 character.

In: Computer Science

The purpose of this question is to develop a web page to determine if two line...

The purpose of this question is to develop a web page to determine if two line segments represent the diagonals of a square or not. The first line segment L1 is bounded by the two points (x1, y1 ) and (x2, y2 ) while the second line segment L2 is bounded by the two points (x3, y3 ) and (x4, y4 ).

Keep in mind that the lengths of the diagonals of a square are equal and bisect each other at right angles. So you need to find the length, slope and midpoint of each line segment in order to determine if they represent the diagonals of a square or not. Remember that two line segments are perpendicular if the multiplication of their slops equals -1.

In this question you might need to search for formulas in some math textbooks or in the e-library to calculate the slope, x coordinate and y coordinate of the midpoint and length of a line segment.

The web page should be implemented by using HTML tags and PHP codes.

The designed web page should include a title, a header, an input form for entering the values of the four points, only numerical values, and an output form for presenting the slopes, lengths, midpoints of the two line segments and the error messages if any. The design and the layout of the web page are left intentionally for the student to distinguish his/her TMA form other students and to show his/her creativity in designing the web page.

The PHP part should include at least four PHP functions; three functions for calculating the slope, coordinates of the midpoint and the length of a line segment. And another function for determining if two line segments represents the diagonals of a square or not.

In: Computer Science

7.   __________________ representation of a binary number uses the bit following (after)       the most significant...

7.   __________________ representation of a binary number uses the bit following (after)

      the most significant bit as the sign bit, making it possible to determine whether an

      integer is negative or positive.

      A). 2’s complement

      B). 1’s complement

      C). bitwise complement

      D). bitwise negation

8. To obtain the 2’s complement of a binary number, it is necessary to flip (reverse) the

      bits and ___________________________.

      A). subtract 1

      B). divide by 1

      C). complement by 1

      D). add 1

9.   An overflow condition in signed numbers has occurred when ___________________.

     A). the carry into the sign bit is different from the carry out of the sign bit

      B). the carry into the sign bit equals the carry out of the sign bit

      C). the carry into the sign bit is a multiple of 10 of the bit value on the carry out of the

            sign bit

      D). the carry into the sign bit is a negative value

10. Expresed as a series of 8 bits, the binary number that results from the addition of the

     decimal (base 10) numbers 120 and –132 is ___________________________.

      A). 00010100

      B). 01010000

      C). 11110100

      D). 00000011

11. The hexadecimal (base 16) equivalent of the binary (base 2) number 110111110111

       is _________________________.

       A). FE7

       B). DF7

       C). D0E

       D). EAD

12. In the EBCDIC collating sequence, lower case alphabetic characters ‘a’ thru ‘z’ are

      considered to _____________ in value than upper case alphabetic characters A

      thru Z.

      A). be lower

    B). be higher

      C). be equal

      D). have more precision

13. One of the inherent problems with migrating code from EBCDIC-based systems to

      ASCII-based systems is that ____________________________________________.

      A). the executable code will run slower on an ASCII-based system than on an

            EBCDIC-based system

      B). output results from sort routines and SQL queries may differ between the two

            systems depending on the specific database values being processed

      C). system performance bottlenecks will occur when the executable code runs on the

            ASCII-based system that did not exist when the executable code ran on the

            EBCDIC-based system

      D). executable code running on EBDCIC-based systems cannot be optimized to run

            faster.

14. Three common Boolean operators are _________________________________.

       A). ADD, SUBTRACT, and DIVIDE

       B). NOT, DIVIDE, and EXCLUSIVE OR

       C). NOT AND, NOT OR, and EXCLUSIVE OR

       D). AND, OR and NOT

15. When the Boolean operator __________ is applied to a Boolean expression, the result

      is the complement of the expression.

      A). NOT

      B). OR

      C). AND

      D). bitwise complement

16. The basic physical component of a computer is the __________________; the basic

       logic element is the _______________.

       A). motherboard, transistor

       B). transistor, multiplexer

       C). transistor, gate

       D). gate, transistor

17. The rules of precedence of Boolean operations are __________________________.

       A). the OR operator has highest precedence, followed by the NOT operator, then the

             AND operator

       B). the NOT operator has highest precedence, followed by the AND operator, then

             the OR operator

       C). the AND operator has the highest precedence, followed by the OR operator, then

             the NOT operator

       D). the NOT operator has highest precedence only when followed by the OR

             operator

18. A(n) ______________ is an electronic device that produces a result based on two or

      more input values.

      A). gate

      B). arithmetic logic unit

      C). transistor

      D). central processing unit

19. The output of the ________________ Boolean operation is true only when the values

      of the inputs differ.

      A). NOT AND (NAND)

      B). NOT OR (NOR)

      C). EXCLUSIVE OR (XOR)

      D). ANDOR (AOR)

In: Computer Science

A __________________ is a combinational circuit that is useful in selecting a       memory location according...

A __________________ is a combinational circuit that is useful in selecting a

      memory location according to a binary value that is placed on the address lines of a

      memory bus.

      A). multiplexer

      B). gate

      C). transistor

      D). decoder

21. A _______________ is a combinational circuit that selects a single output from

      multiple inputs.

      A). decoder

      B). multiplexer

      C). AND gate

      D). OR gate

22. ___________________ creates logic diagrams using the values specified in a truth

      table.

      A). Digital synthesis

      B). Digital analysis

      C). Circuit design

      D). An Embedded system

23. The two principal parts of the CPU are the _____________ and the ____________.

      A). memory bus, arithmetic logic unit

      B). memory bus, registers

      C). datapath, control unit

      D). datapath, arithmetic logic unit

24. A ___________ allows the CPU to share data with other system components.

      A). logic bus

      B). memory bus

      C). system bus

      D). data bus

25. System bottlenecks can arise from the use of a ___________________________ bus

      arbitration scheme when a centralized arbiter selects which process gets the bus.

      A). centralized parallel arbitration

      B). distributed arbitration using self-selection

      C). daisy chain arbitration

      D). distributed arbitration using collision detection

26. Under which of the following scenarios can CPU throughput be improved?

      A). Reducing the number of instructions in a program.

      B). Reducing the number of clock cycles per instruction.

      C). Reducing the number of nanoseconds per clock cycle.

      D). All of the above.

27. ___________ are all input devices which allow us to enter data into a computer.

      A). monitors, printers, speakers

      B). keyboards, mice, scanners

      C). keyboards, printers, plotters

      D). printers, mice, touch screens

28. When the normal execution of a program is altered because an event of higher

      priority occurs, the CPU is alerted to such an event through a(n) ________________.

      A). bottleneck

      B). interrupt

      C). latency condition

      D). abend

29. The ____________________________ of a computer specifies the instructions that

      the computer can perform and the format for each instruction.

      A). instruction set architecture

      B). registers and buses

      C). opcodes

      D). clock cycles

30. Interrupts that cannot be suspended but must be processed in order to keep the system

      in a stable condition are called __________________ interrupts.

      A). detectable

      B). forseeable

      C). maskable

      D). nonmaskable

Section B: True or False Questions

      Each of the following questions is either True or False. Place a T (True) if the answer is True on the answer sheet beside the question; otherwise place a F (False) if the answer is False on the answer sheet beside the question.

31. The job of an assembler is to convert assembly language into machine language.

      T                                        F

32. The arithmetic logic unit is responsible for decoding the binary value in an instruction

       register and creating all necessary control signals needed to execute the appropriate

       microoperation.

      T                                       F

33. To support the passing of parameters between programs, a stack data structure is
       used.

      T                                       F

34. A systems architecture that is backward compatible permits programs written on a

      newer, faster processor to run just as fast on a less powerful and older processor.

      T                                        F

35. There are 230 megabytes in a terabyte.

      T                                        F

36. The decimal (base 10) number 210 is equivalent to 11010010 in binary (base 2) and

      D5 in hexadecimal (base 16).

      T                                        F

37. The hexadecimal number C9D is equivalent to the binary number 110010011101.

      T                                        F

38. A program counter points to the memory address of the instruction that the CPU is

      currently executing.

     T                                        F

39. While statements and if statements are examples of conditional branching

       instructions.

      T                                        F

40. Obtaining the binary equivalent of a decimal (base 10) integer with a negative sign

      requires a bitwise complement of the bits in the positive decimal (base 10) integer

      value of the same magnitude.

      T                                        F

In: Computer Science

Explain the following : Factors driving adoption of intelligent actions within the IoT • Lower machine...

Explain the following : Factors driving adoption of intelligent actions within the IoT

• Lower machine prices

• Improved machine functionality

• Machines “influencing” human actions through behavioral-science rationale

• Deep Learning tools

2. Explain the following : Challenges facing the adoption of intelligent actions within IoT

• Machines’ actions in unpredictable situations

• Information security and privacy

• Machine interoperability

• Mean-reverting human behaviors

In: Computer Science

An established financial company is about to launch their new banking application. Give 5 reasons why...

An established financial company is about to launch their new banking application. Give 5 reasons why the company should use their own data centre rather than cloud computing.

In: Computer Science

3) How to write a code for a 'menu' in c++? write all of the possible...

3) How to write a code for a 'menu' in c++? write all of the possible ways with steps

In: Computer Science

Describe the steps which you would take on AWS and the decisions that would need to...

Describe the steps which you would take on AWS and the decisions that would need to be made to create, configure and run a Virtual Machine Instance

In: Computer Science

List all the elements of the Datapath.    Define or explain the role and nuances of...

  • List all the elements of the Datapath.   
  • Define or explain the role and nuances of any five elements of your choice.  

In: Computer Science

Describe EBS and what features it offers

Describe EBS and what features it offers

In: Computer Science

CSCI 3000 Homework 5 In this homework, you will manage the car data of a dealer....

CSCI 3000 Homework 5

In this homework, you will manage the car data of a dealer. First, you will design a C++ class called Car. A single Car variable (object) have five member variables (attributes): VIN, make, model, year, and price.

Car class attributes should be private, and set/get functions should be implemented to access and update the values. Also, you should have at least two constructor functions to initialize Car objects. Finally a print() function should be implemented to print single Car data on the screen.

Class description is given below:

Car

Type

Member Variables

string

VIN

string

make

string

model

int

year

int

price

Return Type

Member Function

(constructor)

Car() //default constructor

(constructor)

Car(string newVIN, string newMake, string newModel, int newYear, int newPrice)

void

setVIN(string newVIN)

void

setMake(string newMake)

void

setModel(string newModel)

void

setYear(int newYear)

void

setPrice(int newPrice)

string

getVIN()

string

getMake()

string

getModel()

int

getYear()

int

getPrice()

void

print()

Once your class is ready, you will read the “cardata.txt” file, which includes all 250 cars in the dealer. A sample view of the file is given below:

Before you read file, you will create an array of cars having size of 250. This number is always 250 and does not change. In the file, each line contains a single car, for which attributes are separated by space character. So, you can read one line using a simple while loop such as:

     While(inputFile >> VIN >> make >> model >> year >> price){

           //create new car and send it to the corresponding array index

...

}

Once your car array is ready, you will provide following operations to the user in a menu.

  1. Print All Cars: Print all information of all Cars
  2. Print by Make: Get the model name from user and print all cars only in that model.
  3. Print by Price: Get a price input from the user and print all cars that have less than given input.
  4. Exit: Exit from the program.

You can write your code (including the car class definition and main function) in a single cpp file and submit that file. If you can separate the class files from the main program, you will get extra 10 points for the assignment. In that case, you will need to submit three files such as, “car.h”, “car.cpp”, and “main.cpp”. I will show you how to separate class files from main program in class.

On the top of your source code, please add your name and number, Course ID, HW number and the date using a comment block. Please see the example below,

In: Computer Science

In Software engineering, Describe in detail the role of class-oriented metrics in assessing the quality of...

In Software engineering, Describe in detail the role of class-oriented metrics in assessing the quality of an object-oriented system.

In: Computer Science

in java Design and implement a class called Dog that contains instance data that represents the...

in java

Design and implement a class called Dog that contains instance data that represents the dog’s name and age. Define the Dog constructor to accept and initialize instance data. Include getter and setter methods for the name and age. Include a method to compute and return the age of the dog in “person years” (seven times the dog’s age). Include a toString method that returns a one-line description of the dog. Create a Tester class called Kennel, whose main method instantiates and updates several Dog objects.

In: Computer Science

in java Write a program that will print the following output 1 1 2 1 1...

in java

Write a program that will print the following output

1 1 2 1 1 2 4 2 1 1 2 4 8 4 2 1 1 2 4 8 16 8 4 2 1 1 2 4 8 16 32 18 8 4 2 1

In: Computer Science

Girl? Jojo is looking for his love by sending messages to strangers on a dating application....

Girl?

Jojo is looking for his love by sending messages to strangers on a dating application. Because he knows that many people are using fake profile photos, he found a way to find out the gender of the user by their user names. If the number of distinct characters in one’s user name is even, then she is a female, otherwise he is a male. Help him to find out their gender! '

Format Input:

The first line is an integer T representing the number of test cases. The next T lines each consist of a string S representing the user name in the dating application.

Format Output:

For each test case output “Case #X: ”, where X is the case number, followed by “Yay” if the user is a female, or “Ewwww” if the user is a male.

Constraints

• 1 ≤ T ≤ 100

• 1 ≤ |S| ≤ 105

• S only consist of lowercase letter.

Sample Input 1 (standard input):

1

abb

Sample Output 1 (standard output):

Case #1: Yay

Sample Input 2 (standard input):

2

abbc

za

Sample Output 2 (standard output):

Case #1: Ewwww

Case #2: Yay

Note:

On the first sample input, first test case, the user is female because there are 2 different letters namely “a” and “b”, so the output is “Yay”.

note : USE C language, integer must be the same as the constraint, DONT USE VOID, RECURSIVE(RETURN FUNCTION), RESULT, code it under int main (must be blank){

In: Computer Science