Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

How to addition

BYRTYRTYRTY__TRBYTRY
2,323 Views
0 Kudos
1 Solution
jimdempseyatthecove
Black Belt
2,323 Views
8 Replies
BYRTYRTYRTY__TRBYTRY
2,323 Views

Hello sir

please reply 

jimdempseyatthecove
Black Belt
2,323 Views

You may find this useful: https://en.wikipedia.org/wiki/Binary_number

Jim Dempsey

BYRTYRTYRTY__TRBYTRY
2,323 Views

1/9

 

 

hello 

How to write it in binary

jimdempseyatthecove
Black Belt
2,324 Views

Use Google to find your answers.

    binary floating point

Gives:

https://ryanstutorials.net/binary-tutorial/binary-floating-point.php
https://www.youtube.com/watch?v=AU4DtxM9gb0
...

Jim Dempsey

 

BYRTYRTYRTY__TRBYTRY
2,323 Views

Hello sir

how to find 1/9 floating point how to convert it in 10010.1010

 

jimdempseyatthecove
Black Belt
2,323 Views

Binary is represented in powers of 2. 1/9 is a (decimal) fraction. You would convert this into a sum of binary fractions

1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128

To help identify which bit positions, first, as an example, compute 2^n / 9, where n is the number + 1 of significant bits of the precision of the result you want. Then look at the binary result and then place the binary decimal point to the left n bits. You can use the Programmer view of the Windows Calculator or locate one on the web. In Programmers view

For 32-bit fraction with decimal selected, enter: 1, Lsh, 32, =

Result: 4294967296 (decimal), 100000000000000000000000000000000 (binary)

Enter (in decimal mode): /, 9, =

Result: 477218588 (decimal), 00011100011100011100011100011100 (binary)

Insert "." 32 places to left of right most bit: .00011100011100011100011100011100
                                                                 0.00011100011100011100011100011100

As how to represent this in "floating point format", you will have to decide what format. There are many different formats that are used.

In anticipation of you asking....

15/9ths can be calculated with the Windows Calculator (32 bits)

1, Lsh, 32, *, 15, /, 9

Result: 7158278826 (decimal), 110101010101010101010101010101010 (binary)

Float decimal point 32 positions to left: 1.10101010101010101010101010101010

Jim Dempsey

BYRTYRTYRTY__TRBYTRY
2,323 Views

Hello sir

How to add

           10001110100

          00011010000

        00111110100

......................................

...............................................

BYRTYRTYRTY__TRBYTRY
2,323 Views

Hello sir

Which ic is used for addition 

Reply