In this work, we explore the relationship between free resolution of some monomial ideals and Generalized Hamming Weights (GHWs) of binary codes. More precisely, we look for a structure smaller than the set of codewords of minimal support that provides us some information about the GHWs. We prove that the first and second generalized Hamming weight of a binary linear code can be computed (by means of a graded free resolution) from a set of monomials associated to a binomial ideal related with the code. Moreover, the remaining weights are bounded by the Betti numbers for that set.