Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use shift to realize multiplication and division in C language

Shulou Source: shulou.com Published: 2022-06-01 04:21:19 10月03日 Update

This article mainly shows you "how C language uses shift to realize multiplication and division". The content is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn the article "how C language uses shift to realize multiplication and division".

Shift to realize multiplication and division

A = a * 4x b = b / 4x = > a = a > 2

Description: usually multiplied or divided by 2n, you can use shift instead.

A = a * 9 position = > a = (a)

Tags: Multiplication and division operation language content articles learning help methods easy to understand more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Huawei Shulou Technology Microsoft vpn