LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integars Decimal to Binary

I am working on a school project and All i need is integer number to Decimal number. Number input number output. I see that there is number to Hex string conversion but not to decimal. It is my first time using labview. Please help

0 Kudos
Message 1 of 8
(1,128 Views)

It is under Number >> Conversion palette.

ZYOng_0-1679230971868.png

 

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 8
(1,096 Views)

Are you talking about numeric values (from, say, Controls or Indicators on the Numeric Palette for the Front Panel) or string values that can represent numeric values in various string formats, such as Integer (no decimal point, only "whole numbers"), various "Floating point" representations (Sgl, Dbl, Extended Precision), and in different "encodings", such as Decimal, Hexadecimal, or Binary?

 

It always helps us to help you if you include more information about the (school) assignment (in your native language, and, if possible, in English), and your existing LabVIEW code (so we can see what you have tried, and how we can better help you to learn).

 

Bob Schor

0 Kudos
Message 3 of 8
(1,088 Views)

@Tj.adi017 wrote:

I am working on a school project and All i need is integer number to Decimal number. Number input number output. I see that there is number to Hex string conversion but not to decimal. It is my first time using labview. Please help


From your description I think you do not need to change the integer VALUE at all!  You simply need to change the display FORMAT. Any numeric Integer control, indicator or constant has the option of showing its VALUE in Binary, Octal, Decimal or Hexadecimal FORMAT by simply selecting the format from the right-click options.  You can even show the display format glyph! (b, o, d or x)  search the help file and the example finder to gain understanding.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(1,082 Views)

@Tj.adi017 wrote:

I am working on a school project and All i need is integer number to Decimal number. Number input number output. I see that there is number to Hex string conversion but not to decimal. It is my first time using labview. Please help


Integers can be displayed in decimal (using characters 0..9), hexadecimal (0..F), octal (0..8) or even binary (0..1). The display format is just a cosmetic property. Floating point number can be truncated to integers by eliminating (or not displaying) the decimal delimiter and fractional part.

 

Integer datatypes can go to about 20 decimal digits (U64), so if your numbers need more, you need to implement some bignum math.

 

As you can tell from all the answers, your question is completely ambiguous, or even nonsensical!

 

It is not a LabVIEW problem, but a problem of understanding datatypes and formats, irrespective or programming language.

 

So what do you have and what do you want to get? Be very specific!

0 Kudos
Message 5 of 8
(1,073 Views)

I am working on a school project and All i need is Decimal number to Binary number. Decimal Number input in number control and binary number output in Number indicator. For example I want type in 12 in the number control box and get an output of 1100 in thr number indicator.  I see that there is number to Hex string conversion but not to binary. It is my first time using labview. Please help.

Thanks. I want it as simple as possible.

0 Kudos
Message 6 of 8
(1,053 Views)

opening a new thread does not solve your homework 🙂

see: Integars Decimal to Binary - NI Community

 

If you want to display an integer in binary form on the front panel, then look for the "radix" option of the numeric indicator. If you want to output a string with "0" and "1" characters, then look for "Format inot String" and/or "Format Value". If you should to do more by yourself, look for "Number To Boolean Array" or use the very basic functions "Locical Shift" and the other basic boolean operators.

 

Be creative and have fun with your homework.

0 Kudos
Message 7 of 8
(1,040 Views)

You don't really need any code, just an integer control connected to an integer indicator and adjust the display format for each as desired.

 

altenbach_0-1679325838097.png

 

 

A much more interesting problem would be to solve it by implementing the actual math. Try it! You also need to decide what should happen if the number is negative.

0 Kudos
Message 8 of 8
(994 Views)