完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
有没有人建立一个将16位二进制数转换成十进制数的函数?谢谢,JB
以上来自于谷歌翻译 以下为原文 Has anyone built a function(s) that converts a 16-bit binary number into decimal? Thanks, JB |
|
相关推荐
4个回答
|
|
如果它已经是一个数字,你所要做的就是改变显示格式 - Properties> NumberFormat。如果它真的是一个字符串(文本),在它前面加上“#B”并使用asuint16()。
以上来自于谷歌翻译 以下为原文 If it's already a number, all you have to do is change the display format - Properties > NumberFormat. If it's really a string (text), put "#B" in front of it and use asuint16(). |
|
|
|
Hiis是二进制数串行还是并行?简单方法如下:如果平行,你只需使用公式A * 2 ^ 15 + B * 2 ^ 14 ...... + P * 2 ^ 0(A是MSB,P
是LSB)如果是连续的,你必须处理字符串 以上来自于谷歌翻译 以下为原文 Hi is the binary number serial or parallel? the simple method is below. if parallel , you just use formula A*2^15+B*2^14......+P*2^0 (A is MSB, P is LSB) if serial , you must process the string |
|
|
|
通常,如果您有任何问题,第一步是查看VEE安装下的示例文件夹。有大量示例涵盖了VEE编程的不同方面。关于您的问题,我附上了在examples文件夹下找到的示例。
我希望它能做到你想要的。 以上来自于谷歌翻译 以下为原文 Normally if you have any questions the first step is to look into examples folder under VEE installation. There are a huge number of examples that cover different aspects of VEE programming. About your question, I have attached the example that was found under examples folder. I hope it does what you want. 附件
|
|
|
|
要补充jkinzie更改显示格式的答案,请转到视图>属性。然后,您将看到属性面板,要以不同格式显示的属性是NumberFormat,双击它并修改为
你想要使用的格式.Vee没有注意数字的格式,它只是在显示时你必须指定你想如何看它。编辑:你可以尝试做一个像#B1010101010101010这样的常量( #B表示它是二进制的并且用一个简单的字母数字对象显示它,但是将其NumberFormat属性改为Dec.Vee会自动将#B .....改为常量对象中的十进制,以防你想继续看 它在二进制上显示更改Constant对象的NumberFormat。注意:您可以将#B或#b用于二进制,#H或#h用于十六进制。 以上来自于谷歌翻译 以下为原文 To complement jkinzie´s answer to change the display format, go to View > Properties. You will then see the properties panel, the property you want to move in order to display in different formats is the NumberFormat, double click on it and modify to the format you want to use. Vee doesn´t pay attention to the format of the number, it is just when displaying when you have to specify how do you want to see it. Edit: You can try doing a constant like #B1010101010101010 (#B means it is binary) and displaying it with a simple alpha numeric object but changing its NumberFormat property to Dec. Vee will automatically change the #B..... to decimal in the constant object, in case you want to keep seeing it displayed on binary change the NumberFormat of the Constant object. Note: You can use #B or #b for binary, #H or #h for hex. |
|
|
|
只有小组成员才能发言,加入小组>>
1199 浏览 0 评论
2335 浏览 1 评论
2137 浏览 1 评论
2010 浏览 5 评论
2883 浏览 3 评论
933浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
684浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
786浏览 0评论
1199浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 13:50 , Processed in 1.300252 second(s), Total 51, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号