# Assignment to Int Variable Seems Improper

**URL:** <https://verificationacademy.com/forums/t/assignment-to-int-variable-seems-improper/32882>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, systemverilog-datatypes, Real-datatypes\
**Created:** [February 20, 2017, 4:59pm UTC](https://verificationacademy.com/forums/t/assignment-to-int-variable-seems-improper/32882 "2017-02-20T16:59:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sbellock](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/f4b2a3/32.png) [@sbellock](https://verificationacademy.com/forums/u/sbellock)\
**Post date:** [February 21, 2017, 4:09pm UTC](https://verificationacademy.com/forums/t/assignment-to-int-variable-seems-improper/32882/4 "2017-02-21T16:09:34Z")

</div>

_In reply to [Karan](https://verificationacademy.com/forums/t/assignment-to-int-variable-seems-improper/32882/3):_

Yes. C behaves the same way, although the C standard defines it a bit more explicitly than the SystemVerilog standard.

From C11:

> When integers are divided, the result of the / operator is the algebraic quotient with any  
> fractional part discarded. …This is often called “truncation toward zero”.

---

_[View the full topic](https://verificationacademy.com/forums/t/assignment-to-int-variable-seems-improper/32882)._
