Overall Questions Pt1 Flashcards
Is there a difference between the binary numbers 11101 and 00011101?
The number 11101 is a 5-bit binary number, and the number 00011101 is an 8-bit binary number. However, both numbers represent the same value. Both binary numbers correspond to the decimal number 29.
What is the difference between the MDR and the CIR?
The MDR is responsible for temporarily storing data being read from or written to the memory. The current binary instruction that is being executed can be found in the CIR.
How many rows has a truth table in the case there are 2, 3 or 4 input variables?
If there are 2 input variables, the truth table will have 2^2 = 4 rows. If there are 3 input variables, the truth table will have 2^3 = 8 rows. If there are 4 input variables, the truth table will have 2^4 = 16 rows.
Explain how an OR gate works.
An OR gate performs the logical disjunction operation. It takes two input signals and produces a single output signal based on the logical OR operation.
Why is propositional logic relevant for computer science?
Propositional logic forms the basis for circuit design and for the implementation of algorithms in software.
Give some examples of operating systems.
Windows, macOS, Linux, iOS, and Android
What is the difference between an operating system and applications?
An operating system is a fundamental software component that manages the computer’s hardware and provides a platform for running applications.
What is binary?
The binary numbering system is a base 2 numbering system consisting of only ones and zeroes.
Why is firmware stored in a ROM chip?
Firmware is stored on a chip because it is non-volatile, meaning it retains data even without electrical power, and it should not be easily changed.
What is the difference between an operating system and an API?
The operating system is the software that manages the computer. Each operating system has a different Application Programming Interface (API) to communicate with the hardware.
Explain how an AND gate works.
An AND gate performs the logical conjunction operation. It takes two input signals and produces a single output signal based on the logical AND operation.
What is an AND gate?
An AND gate performs the logical conjunction operation. It takes two input signals and produces a single output signal based on the logical AND operation. The output of an AND gate is “true” (or “1”) only if both of its inputs are true; otherwise, the output is “false” (or “0”).
Example sentence: An AND gate is a fundamental component in digital electronics.
What is Boolean Decision Making?
Boolean decision making refers to the process of making decisions or determining outcomes based on boolean logic or binary choices. Boolean logic deals with binary variables that can only take two values: true (1) or false (0). In boolean decision making, the decision or outcome is based on the evaluation of logical conditions using boolean operators such as AND, OR, and NOT. Boolean decision making is used in computer programming to evaluate expressions for conditions, for example, in an if statement or in a loop.
Why we use ¬q instead of q in a truth table?
This allows one to save a column in the truth table. It is also possible to introduce a column with q and another column with not q in the truth table without any problems. Starting directly with not q is done for the purpose of simplification or a more compact representation.
Is p or ¬p in conjunctive normal form?
The definition of conjunctive normal form is a logic formula that is a single conjunction of any number of disjunctions. For example ( p ∨ ¬ q ) ∧ ( r ∨ s ). There can be any number of disjunctions as long as they are joined by a conjunction. Technically, a proposition or negation on its own also qualifies. Meaning that p or ¬p is also in conjunctive normal form in the trivial case.
What are the definitions of conjunctive and disjunctive normal forms?
The definition of conjunctive normal form is a logic formula that is a single conjunction of any number of disjunctions. For example ( p ∨ ¬ q ) ∧ ( r ∨ s ) There can be any number of disjunctions as long as they are joined by a conjunction. Technically, a proposition or negation on its own also qualifies. Meaning that p or ¬p is also in conjunctive normal form in the trivial case. The definition of a disjunctive normal form is a logic formula that is a single disjunction of any number of conjunctions. These normal forms help to simplify logical formulas for use in computer programming and circuit design.
What is the meaning of an implication?
Implication means that if the first proposition is true, the second one should be true as well (this often uses an “If…then” structure). If it is raining outside (p), then I should bring my umbrella (q). Implication is saying something only if the first part is true; if it is not raining outside, then the full sentence does not imply anything. This is written as follows: p ⇒ q
What is the meaning of this symbol ¬?
The symbol ¬ is a negation operator. It is used to negate the truth value of a proposition. For example, if p is true, then ¬p will be false. If p is false, then ¬p will be true. It corresponds to the word not in natural language. If it is not raining, we will go outside.
What is propositional logic?
Propositional logic deals with the study of propositions and their logical relationships. Logical connectives like negation, conjunction, disjunction are provided to connect propositions.
What is an IRQ?
An IRQ stands for “Interrupt Request”. A device can send status messages to the CPU by an interrupt request line, labeled from 00 to 15. If a hardware device, such as a keyboard or mouse, has data to be processed by the CPU it sends a signal to the CPU by generating an IRQ. The CPU interrupts its tasks and executes a corresponding interrupt handler to perform the necessary actions. Each device in a computer system is assigned a unique IRQ number, which is used by the device to request an interrupt. The CPU uses this number to identify the source of the interrupt and determine the appropriate interrupt handler to execute.
Name a few sorting algorithms.
Bubble Sort, Binary Insertion Sort, Quicksort
What is the difference between “channel code”, “the I/O port address”, and “IRQ”?
The “channel code” as it is used in the course book and the I/O port address are both numeric identifiers, that are assigned to a device to be able to exchange information with that device.
Name a few sorting algorithms.
Bubble Sort, Binary Insertion Sort, Quicksort
Example sentence: Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
What is the difference between “channel code”, “the I/O port address”, and “IRQ”?
The “channel code” as it is used in the course book and the I/O port address are both numeric identifiers, that are assigned to a device to be able to exchange information with that device. So both terms refer to the same concept. An IRQ is something different, it is used by the hardware devices to signal the CPU, that there is a me-critical event that needs attention, such as a keyboard input, etc.
Additional information: IRQ stands for Interrupt Request.
What is XML?
XML stands for Extensible Markup Language.
What is RAM and ROM?
RAM is volatile and ROM is non-volatile. RAM is used for temporary storage of data while ROM is used for permanent storage of data. RAM can be written to while ROM cannot be written to.
How does redundancy and error tolerance relate to each other?
Error tolerance mechanisms are designed to detect and correct errors that may occur during data transmission or processing. These mechanisms make use of redundancy to detect errors and enable error correction. By introducing redundant information, it becomes possible to compare multiple copies of the same data and identify any inconsistencies or discrepancies. Redundancy enables error detection mechanisms to determine whether errors have occurred during transmission or storage.
What is the difference between a bit, a byte and an octet?
A bit is the smallest piece of information that can be stored in memory or on disk. A bit can have only one of two values: 0 or 1, off or on. A byte is a unit of digital information that consists of eight bits.
What is a kilobyte?
A kilobyte is a unit of measurement for computer storage. It is equal to 1000 bytes.
What is a truth table?
A truth table displays the outputs of a logical expression for all possible combinations of input values. It is used to determine the truth values of complex expressions based on the truth values of their variables.
How can it be determined in the decimal to binary conversion if the corresponding digit in binary representation is a 1 or a 0?
In decimal to binary conversion, you divide the decimal number by 2 repeatedly while recording the remainders. The remainders will determine if the corresponding digit in the binary representation is 1 or 0.
Example sentence: To convert the decimal number 10 to binary: 10/2 = 5 remainder 0, 5/2 = 2 remainder 1, 2/2 = 1 remainder 0, 1/2 = 0 remainder 1. Therefore, the binary representation of the decimal number 10 is 1010.
How many comparisons need the bubble sort algorithm to sort an array of 5 elements?
Assuming we have an array with the following elements: 8, 2, 5, 9, 1. In the first comparison of the first pass, we compare the numbers 8 and 2. These numbers need to be swapped. Then the array looks like: 2, 8, 5, 9, 1. In the second comparison, we compare the numbers 8 and 5. These numbers need to be swapped. Then the array looks like: 2, 5, 8, 9, 1. In the third comparison, we compare the numbers 8 and 9. These numbers aren’t swapped. In the fourth and last comparison of the first pass, we compare the numbers 9 and 1. These numbers need to be swapped, and the array looks like: 2, 5, 8, 1, 9. The largest element is in the correct order after the first pass and won’t be considered in the second pass. Therefore, we only need three comparisons in the second pass, two comparisons in the third pass, and one comparison in the last pass. That means we have 4 + 3 + 2 + 1 = 10 comparisons.
What is a default gateway?
The default gateway is the router or device that allows the computer to access other devices outside of its local network.
What is a default gateway?
The default gateway is the router or device that allows the computer to access other devices outside of its local network.
Example sentence: The default gateway for this network is 192.168.1.1.
What is a subnet mask?
A subnet mask is a series of ones and zeros that identify which part of the address is the network ID and which is the host ID. IP addresses have the option of being split in different places depending on the need of the network.
Additional information: Subnet masks are typically represented in the form of 255.255.255.0.
What is IoT?
The Internet of Things (IoT) is a network of physical devices, vehicles, buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data. The IoT allows objects to be sensed or controlled remotely across existing network infrastructure, creating opportunities for more direct integration of the physical world into computer-based systems. Each thing is uniquely identifiable through its embedded computing system but is able to interoperate within the existing Internet infrastructure.
Example sentence: IoT devices can communicate with each other to optimize energy usage.
What is a cache?
A cache is a small storehouse of memory directly on the chip which improves memory access time.
Additional information: Caches are commonly used in CPUs to store frequently accessed data.
What is TCP/IP error detection?
“TCP/IP divides data into pieces to be sent over a network into segments or datagrams. These segments have a “header” at the beginning which defines the sending computer, the receiving computer, transmission settings, and also a 16-bit checksum to verify the data. The maximum size of this segment is 65,536 bytes. When each segment arrives at the destination computer it is checked against the checksum value; if the values don’t match, a retransmit request is sent to the source computer. Along with a checksum, TCP/IP also checks for transmission errors on other levels. The receiving computer must also send an acknowledgement (ACK) for each datagram received. This is accomplished by giving each datagram a sequence number in the header. The recipient machine sends an ACK for each sequence number—if one of the numbers is not acknowledged after a certain period of time, the source computer will retransmit. At another level, TCP/IP will also detect broken routes over the network and re-route to new ones. This is one reason why TCP/IP has been used for decades on the internet: it is fault-tolerant. Part of the network can stop working without taking the entire network offline. Routers and devices that stop forwarding network traffic can be worked around by checking for alternate routes to the destination.”
Example sentence: TCP/IP error detection mechanisms ensure reliable data transmission.
What is the difference between checksum and CRC?
Checksum and CRC (Cyclic Redundancy Check) are both methods used for error detection in data transmission. The checksum is a simpler approach compared to CRC. The checksum uses a different mathematical algorithm than CRC.
Additional information: CRC is more robust in detecting errors compared to checksum.
What is the difference between byte and int?
“Byte and int are data types and belong to the numerical data types. Byte is a data type that can store 256 different values; some of them are used for negative values, some for positive values, and one for zero. A variable of the byte data type can contain values ranging from -128 to 127. On the other hand, a variable of the int data type can typically store values ranging from -2,147,483,648 to 2,147,483,647. The int data type uses 32 bits (4 bytes) of memory space, while the byte data type only uses 8 bits (1 byte) of memory space.”
Example sentence: When working with large numbers, it is more efficient to use the int data type.
What is CRT?
A cathode ray tube (CRT) was a type of monitor or television that used a large tube to display images.
Example sentence: CRT monitors were commonly used in the early days of computing.
What is the meaning of verification in the Waterfall Model?
Verification is equal to testing in the Waterfall Model.
Additional information: Verification ensures that the software meets the specified requirements.
How much storage does an integer or a character data type use?
The amount of storage used by an integer or a character data type depends on the programming language and/or the underlying hardware architecture being used. In the programming language Java a variable of data type int always uses 4 bytes (32 bits) and a variable of type char always uses 1 byte (8 bits) of storage.
Example sentence: In C programming, an int typically uses 4 bytes of memory.
What is the data link layer?
“The data link layer is the second layer of the OSI model. The data link layer provides specifications for devices—such as Ethernet—that determine the way signals are sent electronically over the network, as well as standards for devices; this is where the hardware (MAC) address is used. It includes local network error checking, including collisions. Collisions occur when two network devices send out a signal simultaneously, and they collide over physical media. Most networks use collision detection. This means after a collision is detected both devices are instructed to”
Additional information: The data link layer is responsible for establishing and maintaining a link between two directly connected nodes.