Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Get Bit At 1st Position
TheBulgarianWolf
Dec 30th, 2020
905
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
JavaScript
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
function
getBitAt1
(
number
)
{
let shiftedNumber
=
number
>>
1
;
let result
=
shiftedNumber
&
1
;
console.
log
(
result
)
;
}
//Change the number if you want
getBitAt1
(
5
)
;
Add Comment
Please,
Sign In
to add comment
Public Pastes
llama 3 70B sample
Swift | 3 min ago | 6.14 KB
Untitled
C++ | 8 min ago | 3.71 KB
concatenate ranges
C++ | 14 min ago | 1.80 KB
EasyButton Library rev_01
Arduino | 29 min ago | 1.85 KB
Untitled
C | 35 min ago | 1.27 KB
Name here
Lua | 40 min ago | 0.04 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 41 min ago | 0.39 KB
Farkle Point Logic
Python | 52 min ago | 1.56 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!