Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Virtual Machine

Name: Anonymous 2011-09-01 1:28

Hello /prague/

I'm working on implementing a virtual machine of my own design. I started by writing the ALU, and I decided that it should operate on 32 bit words. It allows for many of the basic functions (NOT, AND, OR, XOR, >>, <<, +, -, *, /).

I am entirely new to designing machines (I'm a college sophomore.) and I ran into the problem of representation of floating point data. Is this implemented directly into the hardware of computers, or does software manipulate words to create floating point number manipulation higher up?

Name: Anonymous 2011-09-01 14:50

>>6
I'm using Java, so manipulation isn't really an issue.
The issue is that the ALU receives two 32 bit words and doesn't know whether the words should represent floating-point numbers or integers, it just knows that I passed it those words and a byte signifying that it should perform the add command.

I want to know how computer engineers/various wizards solve this issue. Should I implement a floating-point add and an integer add command, and then add each of those functions to the VM's machine code?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List