Supercharge Your Innovation With Domain-Expert AI Agents!

Floating point number display method and apparatus applied to 8-bit single chip microcomputer

A display method and a display device technology, which are applied in the direction of electrical digital data processing, digital data processing components, instruments, etc., can solve the problems of reducing code operation efficiency and affecting the performance of single-chip microcomputers, etc., so as to increase the selection cost and optimize product performance. Effect

Inactive Publication Date: 2015-12-23
SHENZHEN ZHENBANG TECH
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The object of the present invention is to provide a method and device for displaying floating-point numbers applied to 8-bit single-chip microcomputers, aiming at solving the problem that floating-point number operations in 8-bit single-chip microcomputers reduce code operation efficiency and thus affect the performance of single-chip microcomputers

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Floating point number display method and apparatus applied to 8-bit single chip microcomputer
  • Floating point number display method and apparatus applied to 8-bit single chip microcomputer
  • Floating point number display method and apparatus applied to 8-bit single chip microcomputer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] figure 1 It shows the flow of the floating-point number display method applied to an 8-bit single-chip microcomputer provided by Embodiment 1 of the present invention, specifically including S101 to S104, which are described in detail as follows:

[0026] S101. Obtain a calculation formula of a floating point number to be displayed.

[0027] In 8-bit microcontrollers, various data display problems are often encountered, such as voltage display, temperature display, etc., and these data exist in the form of floating point numbers. Therefore, it is first necessary to obtain a calculation formula for calculating the floating-point number to be displayed according to actual needs.

[0028] S102. Multiply the calculation formula by 10 according to the display accuracy requirements of the floating-point numbers to be displayed n processing, n is a natural number.

[0029] In this embodiment, the obtained calculation formula of the floating-point number to be displayed is m...

Embodiment 2

[0034] figure 2 It shows the flow of the floating-point number display method applied to an 8-bit single-chip microcomputer provided by Embodiment 2 of the present invention, specifically including S201 to S204, which are described in detail as follows:

[0035] S201. Obtain a calculation formula of a floating point number to be displayed.

[0036] S202. Simplify the calculation formula, so that the known numbers in the simplified calculation formula are co-prime numbers.

[0037] In this embodiment, when the numerical value of the known number in the calculation formula is relatively large, the calculation formula can be simplified, and the common divisor of the known number can be removed, so that the known number in the simplified calculation formula is a coprime number . When the data calculation amount of the calculation formula is large, the data calculation amount of the subsequent steps can be effectively reduced and the operation efficiency can be improved by simpl...

Embodiment 3

[0044] image 3 It shows the flow of the floating-point number display method applied to an 8-bit single-chip microcomputer provided by Embodiment 3 of the present invention, specifically including S301 to S305, which are described in detail as follows:

[0045] S301. Obtain a calculation formula of a floating point number to be displayed.

[0046] S302. Simplify the calculation formula, so that the known numbers in the simplified calculation formula are co-prime numbers.

[0047] S303. Multiply the calculation formula by 10 according to the display accuracy requirements of the floating-point numbers to be displayed n processing, n is a natural number.

[0048] In this embodiment, the value of n may refer to the foregoing embodiment 1 or embodiment 2, and details are not described here.

[0049] S304, multiply by 10 n The processed calculation formula directly performs integer calculation to obtain an integer value result.

[0050] Since the input variable type of the cal...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention is applicable to the field of single chip microcomputers, provides a floating point number display method applied to an 8-bit single chip microcomputer and aims to solve the problem, in the 8-bit single chip, that floating point number calculation microcomputer reduces the running efficiency of code and further influences performance of the single chip microcomputer. The method comprises: acquiring a calculation formula of a to-be-displayed floating point number; according to requirements of display precision of the to-be-displayed floating point number, performing processing of multiplying 10n on the calculation formula, wherein n is a natural number; and performing integer calculation on the calculation formula subjected to processing of multiplying 10n to obtain each bit display value of the to-be-displayed floating point number. By means of the floating point number display method applied to the 8-bit single chip microcomputer provided by the present invention, floating point calculation is simplified into integer calculation, and the display value of the floating point number with the same precision is obtained without the need for forcibly converting a variable type and floating point number calculation, so that running efficiency of code is improved, and product performance is optimized.

Description

technical field [0001] The invention relates to the technical field of single-chip microcomputers, in particular to a method and device for displaying floating-point numbers applied to 8-bit single-chip microcomputers. Background technique [0002] At present, 8-bit single-chip microcomputers are widely used in various simple electronic products. In the software development process of 8-bit single-chip microcomputers, in order to realize certain functions, it is often necessary to perform some complex calculations, such as floating-point number calculations. [0003] Complicated floating-point calculations for 8-bit single-chip microcomputers often reduce the operating efficiency of the code and affect the performance of the single-chip microcomputer. In the prior art, the following two methods are generally adopted to solve such problems. [0004] One method is to replace the single-chip microcomputer with higher performance to improve the operating efficiency of the code,...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F7/57
Inventor 陈志杰宋志超
Owner SHENZHEN ZHENBANG TECH
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More