how to convert all false to 0s and rest to 1 in ALL columns

I want to convert all false to 0s and rest to 1s. but FOR ALL COLUMNS ,
can anybody help

I tried rule engine and column expression but didnt work

if (column(“City”) == missingValue())
{
1
}
else
{
column(“City”) == 0
}
this above dont work - all I want it for all columns

hi @Muhammad44 ,
suppose we have this column

City
Row0 Rome
Row1 ?

what would be the result of a correct expression applied to each row?

@duristef thanks much for you response, but actually I have tried and have done it already.

This thread is a duplicate of Replacing ? with 1 and empty column with 1 and rest all with 0s with Column Expression, yes? Let’s keep the discussion in a single thread.