Code covered by the BSD License  

Highlights from
Extended Brookshear Machine emulator and assembler

image thumbnail
from Extended Brookshear Machine emulator and assembler by David Young
Emulator and assembler for a simple computer, a teaching aid for computer science courses.

int82dble(i)
function d = int82dble(i)
%INT82DBLE converts 1-byte signed integer to double
%   D = INT82DBLE(I)interprets the rightmost 8 bits of i as a signed
%   integer and returns the value as a double in d.

%   Copyright 2008 University of Sussex and David Young

d = double(i);
if d > 127
    d = d - 256;
end

end

Contact us at files@mathworks.com