Computer Engineering

2,865 questions on Computer Engineering, part of Engineering & Technology. Below are 12 of them in full, each answered in plain language.

Questions & explanations

1. Given the K-map with 1s at minterms 0, 1, 2, 4, 5, 6, identify the essential prime implicants.

Assume a 3-variable K-map (A, B, C). Minterms: 0 (000), 1 (001), 2 (010), 4 (100), 5 (101), 6 (110). The prime implicants are: group of four covering 0,1,4,5 (A'C'? Actually check: 0,1,4,5 are 000,001,100,101 -> they have A'? No, 4 and 5 have A=1, so it's not a group of four. Let's correct: The prime implicants are: group of four covering 0,1,2,? Actually 0,1,2,? 0,1,2,? Not. Better: For this example, essential prime implicants are those that cover a minterm not covered by any other prime implicant. Minterm 2 (010) is only covered by the prime implicant A'BC'? Actually 2 is 010, prime implicant covering only 2? That would be a single cell, which is prime if it can't be expanded. So essential prime implicants: A'BC' (minterm 2), and maybe others. Let's give a simpler example: For function F = Σm(0,1,2,4,5,6), the essential prime implicants are: A'C' (covers 0,1,4,5) and BC' (covers 2,6) because each covers a minterm not covered by the other prime implicant (A'B' covers 0,1 but those are also in A'C', so not essential). So essential: A'C' and BC'.

2. How does register renaming eliminate false dependencies?

Register renaming removes false dependencies (name dependencies) by using a larger set of physical registers. When an instruction writes to a register, the processor assigns a new physical register to that architectural register. Subsequent reads of that architectural register are directed to the new physical register, while older reads still use the old physical register. This eliminates write-after-write (WAW) and write-after-read (WAR) hazards because the same architectural register name no longer forces ordering. For example, two instructions that write to the same register can be executed in parallel if they use different physical registers. True data dependencies (read-after-write) remain, but renaming allows more out-of-order execution.

3. Compare the impact of memory consistency models on compiler optimizations.

Memory consistency models affect what reorderings compilers can perform on shared memory accesses. Under sequential consistency (SC), compilers cannot reorder memory operations across synchronization points, limiting optimizations. Under TSO, compilers can reorder reads before older writes but not writes before older writes, giving some flexibility. Under weak ordering, compilers have much more freedom to reorder accesses, which can improve performance but requires the programmer to insert explicit memory fences to enforce ordering when needed. Stronger models (SC) make programming easier but restrict optimizations; weaker models (weak ordering) allow more aggressive optimizations but place more burden on the programmer.

4. What is a memory consistency model?

A memory consistency model is a set of rules that define the order in which memory operations (reads and writes) from different processors appear to happen in a shared-memory system. It tells programmers what values a read can return. Sequential consistency (SC) is the simplest model: all memory operations happen in a global order that matches the program order of each processor. TSO (Total Store Order) is a weaker model used in x86: writes from one processor can be seen by others a little later, but reads are not reordered with earlier writes. Weak ordering allows even more reordering, requiring explicit memory barriers to enforce order. Understanding these models helps write correct parallel programs.

5. Compare the Tomasulo algorithm with scoreboarding in handling data hazards.

Both Tomasulo and scoreboarding handle data hazards to enable out-of-order execution, but they differ in key ways. Scoreboarding uses a centralized scoreboard to track dependencies and issue instructions in order, but it stalls if a functional unit is busy or a hazard exists. Tomasulo uses reservation stations and register renaming, which eliminates WAR and WAW hazards and allows instructions to be issued even if earlier instructions are stalled, as long as operands are ready. Tomasulo also uses a common data bus for result forwarding, reducing stalls. Scoreboarding does not perform renaming and has more limited forwarding. Overall, Tomasulo achieves higher performance but requires more hardware.

6. Compare the frame structure of T1 and SONET: what are the key differences?

T1 frames are asynchronous and use a single framing bit per frame to maintain synchronization, while SONET frames are synchronous and use a regular pattern of overhead bytes. T1 has 24 DS0 channels in a frame of 193 bits (192 data + 1 framing), whereas SONET STS-1 has 810 bytes per frame (9 rows × 90 columns) including transport overhead and synchronous payload envelope. T1 uses bit-oriented multiplexing, while SONET uses byte-oriented multiplexing. SONET also supports much higher data rates (e.g., OC-192 at 10 Gbps) and has extensive overhead for operations, administration, and maintenance. T1 is typically used for local access, while SONET/SDH is for long-haul optical networks.

7. How does the design philosophy of RISC affect performance compared to CISC?

RISC processors are designed to execute one instruction per clock cycle using a simple pipeline, which allows high clock speeds. CISC processors may need multiple clock cycles for a single complex instruction, but they reduce the number of instructions overall. RISC relies on compilers to break down complex operations into simple ones, while CISC hardware handles complexity. In practice, RISC can achieve better performance per watt because simpler logic consumes less power. However, CISC can have higher performance for tasks that benefit from complex instructions, like multimedia processing. Modern processors often blend ideas from both, using RISC-like cores with CISC decoding.

8. What is the key design difference between a GPU and a CPU that allows GPUs to handle many tasks at once?

A GPU (graphics processing unit) has thousands of small cores designed for parallel execution, while a CPU has a few powerful cores for sequential tasks. This massive parallelism lets a GPU run many threads simultaneously, making it ideal for workloads like graphics rendering and machine learning. In a GPU, threads are grouped into warps and executed in a SIMT (single instruction, multiple threads) fashion, where all threads in a warp run the same instruction on different data. The memory hierarchy includes a large global memory, shared memory per block, and registers per thread, which programmers manage explicitly in CUDA (Compute Unified Device Architecture) or similar models.

9. What is the basic unit of a T1 digital signal?

The basic unit of a T1 digital signal is a DS0 (Digital Signal level 0) channel, which has a data rate of 64 kbps (kilobits per second). A T1 frame carries 24 DS0 channels, plus one framing bit, for a total of 1.544 Mbps. The frame structure includes a framing bit at the beginning to synchronize the receiver. In SONET (Synchronous Optical Network), the basic unit is an STS-1 (Synchronous Transport Signal level 1) frame at 51.84 Mbps. SONET uses a synchronous multiplexing scheme where lower-rate signals are byte-interleaved into higher-rate frames. SDH (Synchronous Digital Hierarchy) is the international version, with STM-1 (Synchronous Transport Module level 1) at 155.52 Mbps.

10. Compare NAT64 and tunneling: what are the advantages and disadvantages of each?

NAT64 is a translation mechanism that allows direct communication between IPv6 and IPv4 without encapsulation overhead, but it requires a gateway and breaks end-to-end transparency (similar to IPv4 NAT). Tunneling preserves end-to-end IPv6 connectivity but adds header overhead and requires configuration of tunnel endpoints. NAT64 is simpler for clients (no special software) but may not work with protocols that embed IP addresses in payload (e.g., FTP). Tunneling works for any IPv6 traffic but can have performance issues due to encapsulation. NAT64 is better for large-scale deployment where most servers are IPv4, while tunneling is useful for connecting isolated IPv6 islands.

11. Compare TPU and GPU for training large neural networks.

TPUs and GPUs are both used for training neural networks, but they have different strengths. TPUs are designed specifically for tensor operations and use systolic arrays, which can achieve very high throughput for large matrix multiplications with less power. They are tightly integrated with Google's TensorFlow framework. GPUs are more general-purpose parallel processors with many cores, originally for graphics, but adapted for deep learning. GPUs offer more flexibility and support a wider range of frameworks and operations. For very large models, TPUs can be faster and more efficient, but GPUs are more widely available and easier to program for diverse workloads.

12. How does macroarchitecture differ from microarchitecture?

Macroarchitecture is the abstract interface that software uses, like the instruction set and memory model. Microarchitecture is the concrete hardware implementation that executes those instructions. For example, the ARMv8 macroarchitecture defines 64-bit registers and instructions, but different microarchitectures (like Cortex-A76 or Cortex-X1) implement it with different pipelines and caches. Software written for a macroarchitecture runs on any microarchitecture that implements it. Changes in microarchitecture can improve performance without changing the macroarchitecture. Macroarchitecture is stable across processor generations, while microarchitecture evolves.

More Engineering & Technology topics

This page shows 12 of 2,865 questions on this topic. The full set, with progress tracking and five agent perspectives per question, is in the JupiteX app — browse the exam catalogue or browse the Learn library.