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

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • Start Here5
  • SystemVerilog Language Foundations28
    • 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 Verification30
  • Constraint Randomization — Interview-Critical Deep Dive39
  • SystemVerilog Assertions — Interview-Critical Deep Dive41
  • Functional Coverage in SystemVerilog25
  • Testbench Architecture in SystemVerilog24
  • Advanced Language & Integration26
  • Senior & Interview Preparation23
  • Principal-Level Verification34
Loading lesson

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

Part 1 of 9Part 1 of 9/Language FoundationsIntermediate

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

Path

What it proves

Signed and unsigned arithmetic

Recommended

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

Equality, case equality and wildcards

Required

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

unique, unique0 and priority

Recommended

Checked branch claims that replaced the old synthesis pragmas.

Shifts, concatenation and streaming

Optional

Sign-preserving shifts, unsigned concats and one-line byte reversal. Optional on a first pass: streaming is a specialist tool for packing and byte order.

Expression width and evaluation rules

Recommended

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

Path: Required is the core first pass for this part's goal, a self-checking testbench; Recommended is what most learners should read; Optional is reference, specialist or revision material to return to later.

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.

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 lessonPrevious lessonReport an error

See also

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