Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7875 Discussions

Beginner
2,563 Views

Hello sir

How to do addition in intel processor 25468+358743 in binary

1 Solution
Black Belt
2,563 Views

binary floating point

Gives:

Jim Dempsey

8 Replies
Beginner
2,563 Views

Hello sir

Black Belt
2,563 Views

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

Jim Dempsey

Beginner
2,563 Views

1/9

hello

How to write it in binary

Black Belt
2,564 Views

binary floating point

Gives:

Jim Dempsey

Beginner
2,563 Views

Hello sir

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

Black Belt
2,563 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.

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

Beginner
2,563 Views

Hello sir

10001110100

00011010000

00111110100

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

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

Beginner
2,563 Views

Hello sir

Which ic is used for addition