<-- Home
Manage -->

2/

In Arithmetic in Certified Forth Words

Word Name: 2/
Type: Standard word
Data Stack Signature: x1 -- x2
Return Stack Signature: --
Availability: 200x  ANS94  Forth-83  FIG
Forth 200x Reference: 6.1.0330
ANS94 Reference:
Description:

x2 is the result of shifting x1 one bit toward the least-significant bit, leaving the most-significant bit unchanged.

Standard Reference URL: http://forth-standard.org/standard/core/TwoDiv
Example:

None

Comment:

None

See Also: None listed
Test Code:

T{          0S 2/ ->   0S }T
T{           1 2/ ->    0 }T
T{        4000 2/ -> 2000 }T
T{          1S 2/ ->   1S }T \ MSB PROPOGATED
T{    1S 1 XOR 2/ ->   1S }T
T{ MSB 2/ MSB AND ->  MSB }T