<p>Hi, I found this why implementing a binary protocol - negative numbers are encoded in the same way as positive:</p>
<pre><code>10 asByteArray = (-10 asByteArray) .  " => true"
</code></pre>
<p>While (usually) that's not the case and <code>bitString</code> shows it as well:</p>
<pre><code>10 bitString = (-10 bitString ).  " => false"
</code></pre>
<p>I suggest that <code>-10 asByteArray</code> result is same as bitstring represented in bytes, as well as <code>asByteArrayOfSize:</code>.</p>
<p>What do you think?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/324">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW8DxTJsiYzkyvUpnw56kJAlvT5NPks5u6lOVgaJpZM4ZaZ2D">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW6znynjtx6Zjs_UTYzkdcDlQOZ6Lks5u6lOVgaJpZM4ZaZ2D.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Incomplete implementation of `asByteArray` for negative numbers? (#324)"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/324"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/324",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/324",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>