That is usually how I calculate half of a token. but I don't guarantee that it works correctly :) so please check the code and make sure it works and is correct and use it only on your own responsibility. Web3js (I'm using "web3": "^1.6.0") use this https://github.com/indutny/bn.js/ for BigNumbers
function getHalfCoin() {
const decimal = 6; // you can get it from the contract;
var BN = web3.utils.BN;
const decimalAsBigNumber = new BN(decimal);
console.log(decimalAsBigNumber); // BN { negative: 0, words: [ 6 ], length: 1, red: null }
const numberOneAsBigNumber = new BN(1);
const numberTowAsBigNumber = new BN(2);
const numberTenAsBigNumber = new BN(10);
const oneCoin = numberOneAsBigNumber.mul(numberTenAsBigNumber.pow(decimalAsBigNumber));
console.log(oneCoin); // BN { negative: 0, words: [ 1000000, <1 empty item> ], length: 1, red: null}
console.log(oneCoin.toString()); // 1000000
const halfCoin = oneCoin.div(numberTowAsBigNumber);
console.log(halfCoin); // BN { negative: 0, words: [ 500000 ], length: 1, red: null }
console.log(halfCoin.toString()); // 500000
}
https://bybit-exchange.github.io/erc20-faucet/
here mint 1 token on rinkeby
and here transfer 0.5 on rinkeby