How to get first address from subnet ?

Hello All

Please advise me how can mikrotik script can calculate first address in subnet if he knows any IP from this subnet in dotted notification ?
I mean if address is ex. 10.255.192.227/28 then script showld return 10.255.192.224.

Thanx.

Hi
go to this address
http://jodies.de/ipcalc
import address and Netmask, it calculate every thing

I need script to do this, not online calculator.

A quick one:

{
:local IP 10.255.192.227;
:local mask 255.255.255.240;
:put ($IP&$mask)
}

I’m sure there’s a way to simply convert a CIDR notation to a dotted notation for the mask.
-Chris