Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Start Here6
  • SystemVerilog Language Foundations35
    • SystemVerilog Data Types
    • Arrays: Packed, Dynamic, Queues & Associative
    • Procedural Code & Scheduling
    • Operators, Expressions & Width Rules
      • Signed & Unsigned Arithmetic
      • Equality, Case Equality & Wildcards
      • unique, unique0 & priority
      • Shifts, Concatenation & Streaming
      • Expression Width & Evaluation Rules
    • Packages, Typedefs & Compilation
    • Interfaces, Modports & Clocking Blocks
  • Object-Oriented SystemVerilog for Verification35
  • Constraint Randomization — Interview-Critical Deep Dive66
  • SystemVerilog Assertions — Interview-Critical Deep Dive63
  • Functional Coverage in SystemVerilog28
  • Testbench Architecture in SystemVerilog38
  • Advanced Language & Integration30
  • Senior & Interview Preparation34
  • Principal-Level Verification28
Loading lesson

‹SystemVerilog Language Foundations
  1. Topics
  2. SystemVerilog
  3. SystemVerilog Language Foundations
  4. Operators, Expressions & Width Rules

Part 1 · Language Foundations · Intermediate

Operators, Expressions & Width Rules

Hub — signedness, equality flavors, unique/priority, shifts and streaming, and the width rules that silently corrupt results.

  • 5topics
  • 5lessons

SystemVerilog expressions look like C but evaluate by their own rules. Signedness, operand width and X propagation follow the language reference manual, even when the result surprises.

Five rules cause most of the surprises: signedness, X in comparisons, checked case claims, shifts and packing, and the width an expression is computed at. Each lesson below takes one of them and proves it in simulation.

Lesson

What it proves

Signed and unsigned arithmetic

The compare bug, the $signed fix and the traps that poison a context.

Equality, case equality and wildcards

Which equality to use, why casex is banned and what replaces it.

unique, unique0 and priority

Checked branch claims that replaced the old synthesis pragmas.

Shifts, concatenation and streaming

Sign-preserving shifts, unsigned concats and one-line byte reversal.

Expression width and evaluation rules

The (a+b)>>1 puzzle and the literal traps around it.

Check yourself A testbench must tell whether a bus bit is X. Which comparison can say so with a plain 1 or 0?

Case equality, ===. It compares X and Z literally and always returns 0 or 1, while == returns X when an X bit leaves the answer open. The equality lesson shows all three operators side by side.

Interview

Expect whiteboard questions on the width and sign of an intermediate result, on == versus === versus ==?, and on what unique and priority promise synthesis. The answers are the tables in this topic.

PreviousNext: Signed & Unsigned Arithmetic

Up next

Up nextSigned & Unsigned Arithmetic

Sign in to save progress

Practice this lessonReport an error

See also

  • SystemVerilog Data Types
  • Arrays: Packed, Dynamic, Queues & Associative
  • Procedural Code & Scheduling