# Does $bitstoreal function work on signed bit too?

**URL:** <https://verificationacademy.com/forums/t/does-bitstoreal-function-work-on-signed-bit-too/32803>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, bitstoreal\
**Created:** [February 2, 2017, 4:17pm UTC](https://verificationacademy.com/forums/t/does-bitstoreal-function-work-on-signed-bit-too/32803 "2017-02-02T16:17:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saritr](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Post date:** [February 2, 2017, 4:17pm UTC](https://verificationacademy.com/forums/t/does-bitstoreal-function-work-on-signed-bit-too/32803/1 "2017-02-02T16:17:14Z")

</div>

I have the following code:  
real xi = $bitstoreal(in\_trx.xi);

Where in\_trx.xi is tpe of:  
bit signed [15:0]

For in\_trx.xi = FFFF  
The result I got for xi is 0.00000000…

Why?

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [February 2, 2017, 5:01pm UTC](https://verificationacademy.com/forums/t/does-bitstoreal-function-work-on-signed-bit-too/32803/2 "2017-02-02T17:01:12Z")

</div>

_In reply to [saritr](https://verificationacademy.com/forums/t/does-bitstoreal-function-work-on-signed-bit-too/32803):_

Use $itor instead of $bitstoreal.

Then go read the manual.
