Sharp EL-5230, EL-5250 operation manual Nbase Nbase Program?, 2B or not 2B N-base conversion

Models: EL-5230 EL-5250

1 132
Download 132 pages 32.97 Kb
Page 93
Image 93
2B or not 2B (N-base conversion)

Chapter 8: Application Examples

2B or not 2B (N-base conversion)

The conversion functions and logical operations can be used in the NBASE program mode. The following is a simple program that converts a decimal number to binary, pental, octal and hexadecimal formats.

1.Press b 2 1 1 to open a window for creating a NEW program in the NBASE program mode.

2.Type NBASE for the title then press e.

NBASE :NBASENBASE :NBASE PROGRAM? Manual backgroundManual background PROGRAM? Manual backgroundManual backgroundManual background

A NEW program called ‘NBASE’ will be created.

3.Enter the program as follows.

Program code

Key operations

Print”ENTER A

i 1 @ a ENTER s A

 

; e

 

 

Print”DECIMAL NUMBER

i 1 @ a DECIMAL s

 

NUMBER ; e

 

 

Input Y

i 2 ; Y e

 

 

Y¬BIN

; Y @ z e

 

 

Print”BINARY

i 1 @ a BINARY ;

 

e

 

 

Print Y

i 0 ; Y e

 

 

Wait

i 3 e

 

 

Y¬PEN

; Y @ r e

 

 

Print”PENTAL

i 1 @ a PENTAL ;

 

e

 

 

Print Y

i 0 ; Y e

 

 

Wait

i 3 e

 

 

91

Page 93
Image 93
Sharp EL-5230, EL-5250 operation manual Nbase Nbase Program?, 2B or not 2B N-base conversion